I have a NES game in the making. I am defining several constants to help me with managing sprites. I have
spriteyposition = $0200
spritetile = $0201
spriteattribute = $0202
spritexposition = $0203
sprite1 = $00
sprite2 = $04
sprite3 = $08
sprite4 = $0c
sprite5 = $10
sprite6 = $14
sprite7 = $18
sprite8 = $1c
My use case is as follows:
I want to modify the y position of sprite 1
I do:
ldx sprite1
lda spriteyposition, x
adc #$8
sta spriteyposition, x
In my use case spriteyposition should be a memory pointer, but i have a feeling that the assembler is treating it as a regular number
How do I refer to spriteyposition as a memory address and not a number?