Page 1 of 1
Need help with TASM Assembler
Posted: Thu Mar 27, 2003 1:09 pm
by ken_g
Hello,
I am trying to write a program and I'm using the TASM Assember to assemble it. I need to be able to load the high address bit and low address bit into the registars. All the 6502 assembler books I have say I can to it like this:
TEST NOP
LDY #<TEST ;load ADDRH into Y
LDX #>TEST ;load ADDRL into X
But when I use the TASM assember, it loads 01 into Y and 00 into X no matter what I use after the ">" or "<". Even if I do the following:
LDY #<$1122
LDX #>$1122
I still get 01 and 00 instead of 11 in Y and 22 in X. Is this feature not supported in TASM? Is there an easy way around it. Thanks in advance for your help.
Ken Guenther
Posted: Fri Mar 28, 2003 12:25 pm
by ken_g
I got my answer. I need to be doing the following:
TEST NOP
LDX #(TEST >>

; LOAD ADDRH
LDY #(TEST & $FF) ; LOAD ADDRL
Thanks.
Ken Guenther
Posted: Fri Mar 28, 2003 3:27 pm
by GARTHWILSON
I had to put the cursor on the various emoticons and look at the bottom address line to see what you might have written that produced the sunglasses face. It was 8), which makes sense now. Sometimes you have to check the "Disable Smilies in this post" box when you write. (I just did.) Then click "Preview" to make sure you got what you intended. You can always edit your own posts after posting too. The "Edit" box to click on won't show up if you're not logged in though.
You had the < and > backwards for the assemblers I've used, but I still couldn't figure out what would give you the 0 and 1 in X and Y. Did you figure that out?
Garth
Posted: Fri Mar 28, 2003 3:59 pm
by ken_g
Sorry about the smiley face. I didn't notice it until I read your reply. And your right that I had my < and > backwards. It should have been the other way around.
I found out what it is doing is a greater than and less than comparison. I think it defaults to compairing to zero if another variable is not supplied. So it was giving a 1 for true and 0 for false.
Ken
Posted: Sat Apr 26, 2003 1:29 pm
by autoboy
I don't really know what's going on for you. I use the <>-operators all the time to refer to lo/hi-byte of an adress. (We ARE speaking of Turbo Assembler on the c64, right?) Are you sure you have set the adress where the code should go?
* = $0810
test nop
ldx #<test
ldy #>test
?
I guess the assembler might default to starting you program att adress $0000 otherwise, or something like that.
/autoboy
Turbo Assembler vs. TASM
Posted: Tue Apr 29, 2003 2:19 pm
by Mike Naberezny
I am trying to write a program and I'm using the TASM Assember to assemble it. I need to be able to load the high address bit and low address bit into the registars.
(We ARE speaking of Turbo Assembler on the c64, right?) Are you sure you have set the adress where the code should go?
Hi,
TASM is a popular cross-assembler for DOS. It can be found on 6502.org in the Cross-Development Software area.
Regards,
Mike