3 ms·
Best descriptions I heard of the zero page: 1. A bunch of numbered "local" variables 2. Data cache with numbered entries 3. 255 numbered registers IIRC it w
by dapperdrake 2y ago
Best descriptions I heard of the zero page:
1. A bunch of numbered "local" variables
2. Data cache with numbered entries
3. 255 numbered registers
IIRC it was mentioned here on HN, but sadly I lost the reference.
EDIT: Formatting.
- Someone 2y ago> 3. 255 numbered registers 255? Isn’t that 256? There’s nothing special about address zero on 6502.
- masswerk 2y agoWell, on the 6510 address $01 is a port register and address $00 the related data direction register. Therefore, C64 folks tend to ignore these addresses. (So there are just 254 usable zeropage addresses on the 6510, while on a stock 6502 and other variants the full complement of 256 zeropage addresses is usable.)
- masswerk 2y agoI tend to think of them as slow registers, since they provide crucial functionality, as in pre-indexed and post-indexed indirect address modes. There is simply no indirect addressing on the 6502 without them. But the notion of "local variables" (as related to the speed advantage) may be useful, as well.