by daitangio · 1y ago · 0 comments
Zero page is like a having 256 generic RISC registers (a bit faster than accessing to other memory areas).
Very easy to understand how the assembly is micro-coded
Cons:
It is impossible to create a "generic" memory pointer with an index >255 without auto-modifying code.
It is a true 8bit only system and cannot manipulate 16bit word easily Steve Wozniac created a small VM just to manage 16 bit Integers (see the his Byte magazine articles).
Too much addressing mode.
So I like 6502, but I disagree a bit.
It was called SWEET16: https://en.m.wikipedia.org/wiki/SWEET16
A BYTE Magazine article by Wozniak: http://amigan.1emu.net/kolsen/programming/sweet16.html
Porting Sweet 16 by Carsten Strotmann (with source code) http://www.6502.org/source/interpreters/sweet16.htm
Sure it is. Just store your pointer in zero page, set Y to 0 and use the (ZP),Y addressing mode.
(Actually, what I wished for was slightly different: only the high byte of the effective address would be fetched from zero page, the low byte being the Y register. In this way, one could keep both bytes of the pointer in zero page, LDY the low byte and use my zp indirect mode. The first use of a pointer would cost an extra instruction / 2 cycles, but further uses of the same pointer would be cheaper.)
The 6502 did intentionally away with quite a number of features, but, as it had since become evident that it was a computer CPU, WDC added (back) for the CMOS version some of what was kind of missing for this application.
(The thing I'm probably missing most on the 6502 is a sequential-shift or barrel-shifter, shifting/rotating by multiple bit positions at once. This would be so great for games, graphics, encoding and decoding… Sophie Wilson had the wisdom to opt this into the ARM architecture.)