Remix.run Logo
renewedrebecca 9 days ago

I see this idea a lot, but I don't really buy it. I've coded in 6502 assembly for years, and the zero page is not register-like at all.

Best thing you can say about zero page is that it only requires one read cycle to fetch a value from. (Or one write cycle to store a value to it.)

Why ZP isn't like registers: You can't do register operations with it. For example, you can do this with the accumulator:

LDA #03 ; load immediate value of 3. STA $c000 ; store it at $c000.

or

LDA $1004 ; load a value from $1004. ADC $4000 ; add the value stored at $4000. STA $4001 ; store to $4001.

You can't do this at all with a zero page address. You have to go through an actual register first.