| |
CyberBrain Administrator
Posts: 392 |
HELP!!! I need help with the CA65-Assembler (part of CC65)
At the moment i'm writing an 1K-game in CA65 (part of the CC65-compiler package), but i have a problem:
When i use instructions that adresses zeropage, it doesn't assemble them into zeropage instructions. (this is *VERY* critical when writing an 1K-game!! :) )
example: when i write: LDA $FF
it assembles it into: LDA $00FF ($AD $FF $00)
I've looking at the documentation but didn't find anything that could help me. :( SO PLEASE HELP IF YOU CAN!!
(Has it got something to do with "segments"? - whatever that means. If you know what segments is, then please explain it to me too.) |
|
| |
CyberBrain Administrator
Posts: 392 |
Groepaz told me on IRC, that if i write LDA <bla it should allways work (a side effect of how the assembler scans files in one pass) - as cool as CA65 is, this is pretty bad.
(Btw, it didn't bug with "LDA $FF" i just discovered :), it bugs with "ZP=$FF, LDA ZP" (and only sometimes) - so from now on i guess a have to write "LDA <ZP")
|
| |
bubis Account closed
Registered: Apr 2002 Posts: 19 |
I have the same problem (and others) with that assembler. The problem can be solved in most cases if you declare your variables in zeropage segment. Like this:
.zeropage
zp = $ff
.code
lda zp
bubis/RSC |