Zero page

The zero page or base page is the block of memory at the very beginning of a computer's address space; that is, the page whose starting address is zero. The size of a page depends on the context, and the significance of zero page memory versus higher addressed memory is highly dependent on machine architecture. For example, the Motorola 6800 and MOS Technology 6502 processor families treat the first 256 bytes of memory specially,[1] whereas many other processors do not.

Unlike more modern hardware, in the 1970s computer RAM was as fast as the CPU.[citation needed] Thus it made sense to have few registers and use the main memory as an extended pool of extra registers. In machines with a relatively wide 16-bit address bus and comparatively narrow 8-bit data bus, calculating an address in memory could take several cycles. The zero page's one-byte address was smaller and therefore faster to read and calculate than other locations, making the zero page useful for high-performance code.

Zero page addressing now has mostly historical significance, since the developments in integrated circuit technology have made adding more registers to a CPU less expensive and CPU operations much faster than RAM accesses.

  1. ^ Cite error: The named reference Student Papers in Computer Architecture was invoked but never defined (see the help page).