I implemented "multitasking" (well, two-tasking) between a BASIC program and native code on a Z80, using a "supervisor" driven by hardware interrupts. There's just so much you can pack in a 4MHz CPU with a 4-bit ALU (yes, not 8-bit). It worked for soft-realtime tasks, but would be a rather weak desktop.
I implemented "multitasking" (well, two-tasking) between a BASIC program and native code on a Z80, using a "supervisor" driven by hardware interrupts. There's just so much you can pack in a 4MHz CPU with a 4-bit ALU (yes, not 8-bit). It worked for soft-realtime tasks, but would be a rather weak desktop.