Stack Processor, Pt. 4

Since presettable 16-bit up/down counters are impossible to find, maybe the data and return stacks ought to be limited in size, with the high 8 (data stack) or 12 (return stack) bits being in a separate register.

It might be interesting to add some basic security features to the system that would allow implementation of processes. For example:
– only “ring 0” (which could be the code in the lowest 4K for example) can directly modify the data/return stack pointers or else an interrupt would trigger
– a page table that maps, say, 4K worth of memory from anywhere in the 64K ram to 0x0000 – 0x0FFF, and this is the only region the process can access
– By making “ring 0” be the code that executes in the first 4K of RAM (for example), things like UART or I/O functions might be accessed by special mechanism – software interrupts (DOS style) for example. Alternatively, I/O ports (to which the UART would be connected) could be mapped through a paging mechanism also.

Comments are closed.