3 ms·
Oooh. I used to have a Radio Shack Color Computer, and I loved the 6809. So much cleaner than the 6502. Two 8-bit accumulators, A and B, which can be combine
by metageek 16y ago
Oooh. I used to have a Radio Shack Color Computer, and I loved the 6809. So much cleaner than the 6502. Two 8-bit accumulators, A and B, which can be combined as a 16-bit accumulator, D. MUL, which sets D to A * B. Four 16-bit index registers, all of which can be used interchangeably in any indexed-mode operation. (Two of them can be used as stack pointers.) A rich indexed mode, including constant offset, accumulator offset (A, B, or D), and offset from PC (allowing position-independent code).
The 6502, by contrast, had one 8-bit accumulator, A, and two 8-bit index registers, X and Y. X and Y were used differently: IIRC, you could do (in C syntax) * (addr+X) or (* addr)+Y, but not the other way around. No easy way to do position-independent code. (I suppose you could hack it with OS support, though, by providing a routine at a fixed location that reads the caller's address from the stack.)