Re: [stella] TASM

Subject: Re: [stella] TASM
From: Kevin Horton <khorton@xxxxxxxxxxx>
Date: Wed, 28 Nov 2001 20:43:32 -0500
At 13:17 11/28/01 -0800, you wrote:
At 02:22 PM 11/28/2001 -0500, you wrote:
Tasm also uses a different format for hex constants, a trailing h rather
than a leading $

        LDA #$FF ; Dasm
        LDA FFh  ; Tasm

According to what I read, it will still do the % or $ notation except in certain places that it uses those characters for other things.

I use TASM exclusively for 6502, Z80, 8085, and some other stuff. It helps me standardize my assembly programming. Yes, you can use the $ notation, and I'm fairly sure the % notation as well. Normally, I like to declare my radix discretely however. i.e.:

lda #0eah  ;hex
lda #0100 0011b  ;binary
lda #43d  ;decimal

The assembler defaults to decimal radix which makes counters and such nice, though I usually will declare the radix to prevent problems when I have to go back over the code.

To define data bytes, you use the .db pseudo-op, or for words the .dw pseudo-op. i.e.

table1:  .db "this is text"
         .db 000h,0001h,002h,003h
         .db "null-terminated",0
         .db 001h,"mixed",034h
         .db label

table2: .dw routine1,routine2,routine3

^ that will make a table of 16 bit pointers, stored LSB first of course. I *think* you can store in big endian by using .drw

for variables in RAM, you use the "block" pseudo-op

.org 0080h

var1:    .block 1    ;reserve 1 byte of RAM
var2:    .block 1
var3:    .block 2    ;reserve 2 bytes for say, 16 bit pointer

That's about all the tasm-related things I can think of. oh, one more cute trick. To fill up a ROM to get to the vectors you use the fill command:

.org 01000h ;start of ROM space

  reset:  cld
          ldx #0ffh

<code goes here>

         .fill 01ffah-*,0ffh     ;fill up to 01ffah with 0ffh
         .dw nmi
         .dw reset
         .dw irq

Where "nmi" "reset" and "irq" are labels to the code somewhere in the project.

---------------------------------------------------------------------------------------------- Archives (includes files) at Unsub & more at

Current Thread