nineTENdo wrote:
For Example will:
Your example was correct
Quote:
Or will you have to count the fact that each entry is 3 bytes and instead every 3 bytes?
Each entry is only 1 byte. If you want a 3-byte variable you'll have to leave a space of three bytes for it to use:
Code:
Temp1 = $00 ; Temp1 is to use $00, $01, and $02
Temp2 = $03 ; Therefore Temp2 can start at $03
Quote:
Can you use page 1 for variables too?
You can use parts of it... a significant portion of the $01xx page is reserved for the stack, and if your variables conflict with the stack you'll have some problems.
So pretty much... don't use $01xx for variables. $02xx - $07xx is fair game though (however you'll want to dedicate a whole page to sprite info that you can DMA to Sprite RAM).
Also -- I would not define variables with .db. I guess it might work, but it's kind of "blech", since that's not what .db is for at all. Not to mention for .db to work that way you'd have to .org to RAM space (which you should probably never do). Stick to = or .equ, or whatever other command your assembler uses for that kind of thing. .db is for something else.