3 ms·
Which is neither required nor sufficient for preemptive multitasking, which the OP was asking about. The 2nd set can speed up interrupt handling though (and wa
by guenthert 3y ago
Which is neither required nor sufficient for preemptive multitasking, which the OP was asking about. The 2nd set can speed up interrupt handling though (and was used this way in the BIOS/BASIC of Amstrad CPC).
- actionfromafar 3y agoI don’t understand. What would you need? You can look at the registers, save them, populate them with another tasks contents, rinse, repeat
- guenthert 3y agoOthers have already correctly pointed out that you'll need a (periodic) interrupt source and facility to handle such. As the Z80 doesn't provide a protected or system mode, it needs to be a non-maskable interrupt, which the Z80 fortunately does provide (iirc, that wasn't used in the Amstrad computers though). Sure you'll need to save the registers, but you could do that using the stack as well. The second register set just makes it quicker.
- actionfromafar 3y agoBut if the processes don’t mask the timer interrupt, it could be used instead of NMI?