Absolute indexed addressing mode reaches memory by starting with a full 16-bit address and adding the current X or Y register value. The resulting address can be anywhere in memory. For example, with X set to $02, an operand written as $0300,X refers to $0302. section 3.3.1
Use this mode when a base address identifies the start of a memory area and an index register selects a position within it. The comma and register are part of the operand: $0300,X uses X; the mode can also use Y. This differs from zero-page indexed addressing, whose base is an 8-bit zero-page address. section 3.3.1
Load from an indexed address
Store $20 at $0302, set X to $02, then load from $0300,X. The processor calculates $0300 + $02, reads $0302, and places $20 in A. lda #$20 sta $0302 ldx #$02 lda $0300,x section 3.3.1
The same calculated address can supply an arithmetic operand. With $05 stored at $0302, A holding $10, and X holding $02, `adc $0300,x` reads $05 from $0302 and adds it to A, leaving $15 after carry is cleared. section 4.1.1
Store at an indexed address
For an indexed store, load A with the value to write, set the index, and use an absolute indexed destination. With A = $ee and X = $01, `sta $0300,x` writes $ee to $0301. Absolute indexed stores use A as the source register. section 3.3.2
Figure 3.12 Loading a value from memory using an index register
Follow the diagram from the base address and X value to the final memory location read by an indexed load. section 3.3.1
