Pre-emptive Z80 multitasking explainer
github.com
Pre-emptive Z80 multitasking explainer
1–10 of 33 posts
Re: Pre-emptive Z80 multitasking explainer
#2Re: Pre-emptive Z80 multitasking explainer
#3Re: Pre-emptive Z80 multitasking explainer
#4I recall spending a few days mulling over the exact sequence of instructions to save the state of the previous task without clobbering the flags or any registers.
The result was that I could register functions (procedures) as tasks with their own little stack, and it would switch preemptively between them in a round-robin fashion.
I'm not familiar with Z80 asm but from what I can gather it looks very similar to what I had. I was running in real mode so also had very limited resources for each task, and a hardcoded upper limit on the number of tasks.
While I'm wildly more productive these days, I kinda miss how not having internet made accomplishments so much greater. It's like walking up a mountain on your own vs taking a tour bus to the summit.
Re: Pre-emptive Z80 multitasking explainer
#5Re: Pre-emptive Z80 multitasking explainer
#6Funniest 8080-era multitasker was made by Siemens in 1976. Instead of allocating memory from common RAM, they just switched small RAMs mechanically. You only needed to dump registers at each switch. Particularly economical in 8080 which is not good for indexed memory models like Z80.
Re: Pre-emptive Z80 multitasking explainer
#7Re: Pre-emptive Z80 multitasking explainer
#8Re: Pre-emptive Z80 multitasking explainer
#9Re: Pre-emptive Z80 multitasking explainer
#10If you look at old issues of Byte magazines you see a huge number of ads for high-end S100 system vendors that sold systems that could run MP/M, a multitasking OS for the Z80 https://en.wikipedia.org/wiki/MP/M