| |
Fix
Registered: Feb 2003 Posts: 55 |
Why does this work in a crossassembler?
Hi,
Why does this work in a crossassembler and not in TASS 5.x
I get illegal quantity.....
Or do I have to do it on a Zeropage to have it work ?
CROSS ASSEMBLER:
lda (text),y
rts
text: dc.b 0,0
- - -
TASS 5.2
lda (text),y
rts
text .byte $00,$00
Have I made a fool out of myself now ?
/Fix |
|
| |
cadaver
Registered: Feb 2002 Posts: 1163 |
The crossassembler is not being strict enough, and therefore compiles a program that won't work (unless you assemble it to the zeropage)
|
| |
Fix
Registered: Feb 2003 Posts: 55 |
I missed one important thing in the crossasm, there where a
seg.u zp_up
org $02
:-)
and in tass you need to write
test = $02
and then I can address them as I want.. :-)
Thanx.. |
| |
Graham Account closed
Registered: Dec 2002 Posts: 990 |
this is obviously an error of the cross assembler. "(text),y" does not work in non-zeropage adresses. i guess the crossasm mistakes it for "text,y" and thinks the brackets are just a part of an expression. |
| |
Graham Account closed
Registered: Dec 2002 Posts: 990 |
btw, if you want to assemble to zeropage adresses with tasm, you cannot do that directly. use .OFFS to move the assembled code to a non-zeropage part of the memory, else you will trash tasm while assembling (since it uses zeropage adresses itself). |
| |
WVL
Registered: Mar 2002 Posts: 924 |
Quote: Hi,
Why does this work in a crossassembler and not in TASS 5.x
I get illegal quantity.....
Or do I have to do it on a Zeropage to have it work ?
CROSS ASSEMBLER:
lda (text),y
rts
text: dc.b 0,0
- - -
TASS 5.2
lda (text),y
rts
text .byte $00,$00
Have I made a fool out of myself now ?
/Fix
wtf do you want to do with
lda (text),y ?!?!
i hope you mean you have your pointers to your text there and not the text itself. Anyhow it's bad coding practice (even on the c64 and in assembler ;) to call something what it's not.
it should be called 'textpointer' or something.
are you sure you don't just mean
lda text,y ? |
| |
hollowman
Registered: Dec 2001 Posts: 475 |
Quote: wtf do you want to do with
lda (text),y ?!?!
i hope you mean you have your pointers to your text there and not the text itself. Anyhow it's bad coding practice (even on the c64 and in assembler ;) to call something what it's not.
it should be called 'textpointer' or something.
are you sure you don't just mean
lda text,y ?
so everytime i use different words having to do with the human genitalia as labels, it is bad coding practise since i call something what its not? |
| |
WVL
Registered: Mar 2002 Posts: 924 |
curse words in code are generally accepted as useful contributions in pieces of code ;)
Anyway, i was just interested if Fix really knows what the code that he has written down does.. |
| |
Hoogo
Registered: Jun 2002 Posts: 105 |
Quote: so everytime i use different words having to do with the human genitalia as labels, it is bad coding practise since i call something what its not?
Calling them what they are ia also not always a good practice, even if they are damnlabel1 to damnlabel294 :-) |
| |
Puterman Account closed
Registered: Jan 2002 Posts: 188 |
wvl: it's arguable whether variable names which indicate the type of the data is good coding practice or not. |
| |
Hoogo
Registered: Jun 2002 Posts: 105 |
Speaking variable names can make bugs more visible. If you choose the prefix ba_ for ByteArrays, "lda ba_states" or "jmp ba_states" most time make no sense, "lda ba_states,y" and "jmp (ba_states)" might be better. |
... 2 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 - Next |