Code: Select all
ldy #$00
loadActor:
lda actorList, y
sta currentactor, y
iny
cmp #$07
bne loadActor
ldx currentactor+4
ldy #$00
lda #$02
sta currentsprite
sty currentsprite+1
For the first part of loadActor, it works fine, and whatever needs to be written to actorList is written. However, when trying to store a constant value in currentsprite, it just doesn't get written. What is going wrong here?