434 always be taken as an address in page zero. If the address moves out of page zero the processor will perform a ‘wrap-around’ operation to take it back into page zero – for example an address of &102 would be wrapped around to &002. Another type of indexed addressing is pre-indexed indirect addresing. An example of the instruction format is: LDA (&82,X) This instruction adds the address in the X register to &82 to give a new address; the contents of the location at this new address, and the contents of the location above it, together supply the full 16-bit address from which the accumulator is loaded.
This addressing mode is designed for use with a table of addresses in zero page locations. For example, if we have ?&70=&00 ?&71=&20 ?&72=&FF ?&73=&21 then LDX #0 \ set X to zero LDA (&70,X) \ A=?&2000, ie address in (&70+X), (&71+X) LDX #2 \ set X to 2 LDA (&70,X) \ A=?&21FF, ie address in (&72), (&73) Note that the base address, and the base address plus the offset must be in page zero (the wrap around operation described above still applies). The Y register cannot be used for this addressing mode. The mode is called pre-indexed because the index is first added to the base address to give the address of the pair of locations which hold the address loaded into the accumulator.
In post-indexed indirect addressing, the 16-bit address held in the location pair given by the base address is extracted first, and the index is then added to this address to give the address of the location from which the accumulator is loaded. An example of the instruction format is: LDA (&80),Y