Indexed-indirect addressing
In this rarely used Addressing mode, X index register is used to offset the zero page vector used to determine the effective address. Put another way, the vector is chosen by adding the value in the X index register to the given zero page address. The resulting zero page address is the vector from which the effective address is read.
Indexed-indirect addressing is written as follows:
LDX #$00 LDA ($02,X)
In the above case, X is loaded with zero (0), so the vector is calculated as $02 plus zero (0). The resulting vector is ($02). If zero page memory $02 contains 00 80
, then the effective address from the vector (02) would be $8000.
This addressing mode would only be useful to select a vector from an array of zero page vectors, and as such is very rarely used.