Zero page

The zero page is the first 256 memory locations (addressed between $0000 and $00FF) of the 6502 microprocessor. The zero page is considered to be prime real estate in the RAM because the 6502 can address these locations with only a single byte instead of two, as with all other addresses.

In the precious memory of a 6502, this saves space. This is accomplished by leaving off the front two zeros in the address.

 LDA $04 ; load the accumulator from memory location $0004

This is known as zero page addressing. To get at any memory location not in the zero page, you will have to use an absolute address consisting of two bytes.

 LDA $0104 ; load the accumulator from memory location $0104
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution 2.5 License.