Zero-Page Addressing

From NES Hacker Wiki
Jump to: navigation, search

In Zero-Page Addressing, the operand is a memory address rather than a value. As the name suggests, the memory must be on the zero-page of memory (addresses $0000-$00FF). You only need to supply the low byte of the memory address, the $00 high byte is automatically added by the processor.

Zero-Page addressing is very similar to Absolute Addressing, except that absolute addressing requires a full 2-byte address, and can access the full range of the processor's memory ($0000-$FFFF).


Examples

This example uses Zero-Page Addressing to load the accumulator with whatever value is stored in memory address $00EE. Notice that the operand doesn't include $00.

0001:A5 EE     LDA $EE         ; Load A with whatever value is in memory address $00EE.


Opcodes

Since Zero-Page addressing is essentially the same as Absolute addressing, the use the same opcodes. The following opcodes support zero-page addressing: