4 ms·
Since it's a Z-80 which is a primarily 8-bit microprocessor with some 16-bit features and no MMU I'm going to go with no Linux. However, microcontrollers and g
by cestith 9y ago
Since it's a Z-80 which is a primarily 8-bit microprocessor with some 16-bit features and no MMU I'm going to go with no Linux.
However, microcontrollers and game systems have been using more than 64k with it for ages now. It's all done with bank switching. https://www.retrobrewcomputers.org/doku.php?id=boards:sbc:z-berry:memory https://www.retrobrewcomputers.org/doku.php?id=boards:sbc:z-... explains how Z-Berry does its bank switching.
- Someone 9y agoYou can use the bank switching logic as a minimalistic/sort of MMU, giving each process a full memory bank and nothing else. To get real protection of programs against other programs and of the kernel against any programs you would have to make the bank switching logic privileged, but I would think that's doable with some external logic that snoops the memory bus and only allows switching to another bank if either the current bank is bank zero or the destination bank is bank zero and the instruction pointer matches that of the kernel's entry point. You also would have to force a switch to bank zero to preempt processes. I think the easiest approach would be a timer that, when it expires, switches to bank zero and interrupts the CPU. With this hardware, that could give you 7 processes, max. I think you could have fun with a minimal Unixlike OS in that. Edit: it will be a bit of a challenge to pass arguments to the kernel if the kernel can't rely on hitting trusted code when it bank-switches back to a process to, say, read a memory buffer, but that can probably be overcome by force-mapping, say, the last kB of RAM to the kernel's memory space.
- pjmlp 9y agoWell, one can for sure have CP/M.