<One of the smallest multitasking systems I've seen was the I/O processor
<on the PERQ 2's. It was a Z80 with 4K ROM and 16K RAM, but said ROM
<contained essentially a cooperatively multitasking kernel. Some tasks
<were in ROM, others were loaded into RAM. OK, so the user never realised
<what was going on, but that doesn't alter the fact that it was there :-)
The smallest I've seen run on 8080 and fits in some 100 or so bytes. It
was published in Kilobaud April 1978 page 102 and yes it was real.
To multitask on most anything all you need is an interrupt and save the
context of the current task and start some new task... the order, where
the tasks are and memory allocation can be somewhat tricky but, for
small tasks its pretty trivial. I've done it in 8048 MCUs where the
resources were 64byts of ram and 1k of rom and the tasks were keyscan,
display, serial IO and code conversion. The timer provided the
interrupt.
Allison