[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unixisms on top of P8?
On Friday, December 21, 2012 7:36:17 PM UTC-8, mdj wrote:
> Going all-out Unixy requires multitasking, and doing this well on the 6502 is extremely difficult, primarily because of the 6502 having a single 8 bit stack pointer. This means that the stack is at a fixed location in memory - page $01.
>
This has been one of the real weaknesses of the 6502 in relation to general-purpose "multi-tasking". The stack-based architecture has emerged as a "must" for general-purpose and modular programming. 256 bytes is really tight for the stack address space shared by multiple tasks.
MOS should have opted for a 16-bit stack pointer; the program counter is already 16-bit. The Intel processors (and I think the 6809, 68000, etc.) followed the trend where the stack pointer can point anywhere in the memory address space.
The IIgs 65816 improves on the 6502 by using a 16-bit stack pointer (64KB), but at the same time, the full memory address space has been extended to 24 bits (16MB).