I'm trying to wrap my head around indexed indirect addressing.
i.e., lda (ZP,X)
- can someone tell me what it might be used for? I know what it does, I'm just having a hard time figuring out what situations it might be useful for.
Posted Thu Jan 27, 2005 12:32 PM
Posted Thu Jan 27, 2005 2:12 PM
vdub_bobby said:
Posted Thu Jan 27, 2005 2:50 PM
Thomas Jentzsch said:
vdub_bobby said:
ldy #4 ldx #8 Loop lda (ZP1,X) sta ZP2,Y;this is really lda $00NN,Y dey dex dex bpl LoopBut that takes 10 bytes for the pointers plus 5 bytes for the ZP storage (unless you are storing to TIA registers or something). Plus all the overhead to setup all the pointers correctly.
Posted Thu Jan 27, 2005 3:02 PM
Posted Thu Jan 27, 2005 3:22 PM
Robert M said:
Quote
Posted Thu Jan 27, 2005 3:33 PM
Robert M said:
lda (ZP,X) pha dex lda (ZP,X) pha rts?
;--this is on the zero page: JumpTable .word Routine1,Routine2,Routine3,Routine4 ... ldx #7 Loop ;--check condition beq ConditionTrue dex dex bpl Loop ... ;--elsewheres ConditionTrue lda (JumpTable,X) pha dex lda (JumpTable,X) pha rts
Posted Thu Jan 27, 2005 3:47 PM
vdub_bobby said:
;--this is on the zero page: JumpTable .word Routine1,Routine2,Routine3,Routine4 ...[snip]
0 members, 0 guests, 0 anonymous users