A proof of concept Z80 Assembly program that "[...] simulates task multitasking that can run up to eight separate tasks at the same time." It requires a specific hardware and software setup.
https://github.com/bchiha/Ready-Z80/tree/main/29-Multitasking