So now we can do timeshare Nintendo Gameboy? /s
I actually wrote my first toy multitasker on a Gameboy Advance, although that's ARM7... Great little project. It's a joy to develop on an emulator with good debugging tools.
Pre-emptive Z80 multitasking explainer
31–33 of 33 posts
Re: Pre-emptive Z80 multitasking explainer
#32Earlier quoted context omitted.
Forgot this is HN where everything is taken literally. Humour is [Flagged]. I myself made a Coin-Operated Telephone server, but in 1978 the processor was already cheaper and faster 8085.
Low effort humour is discouraged, it's in the site guidelines and since it wasn't amusing, just confusing, perhaps you should skip the humour and consult them.
I think this essay is where it originated: https://paulgraham.com/hackernews.html
Re: Pre-emptive Z80 multitasking explainer
#33Writing my own pre-emptive multitasker in Turbo Pascal on our x86 as a self-taught teenager was a core memory thing. I 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 t…
The experience of figuring these things out was tonnes of fun! There's nothing like following threads of assembly with a debugger or disassembler in the Amiga's ROM to get a better idea of how the code worked. And since systems were so much smaller in the 1980s, a single person really could understand virtually everything about the system with enough time and effort.
The biggest challenge for me was that the ROM Kernel Manuals were very expensive back then, so I wasn't able to get copies until far too late in my Amiga years (with Commodore being in its death throes).
Motorola and Intel were great back then as they would ship out printed copies of all the documentation for various CPUs and support chips for free upon request!
Good times!