Multitasking on a Z80 CPU

I’ve been thinking about doing this for years, and it’s finally here. Pre-emptive Multitasking on the Z80. This video goes through the steps of setting up a Multitasking environment. Tasks are switched in and out of the CPU to create the illusion that all tasks are running simultaneously.

The sample code is a “Proof of Concept”, and there is room for improvement. But it’s a start.

The code designed for the TEC-1G can be viewed at:
https://github.com/bchiha/Ready-Z80/t…

If you like my work, consider buying me a Coffee!
https://buymeacoffee.com/readyz80

00:00 Intro
00:53 Basic Concept of Pre-emptive Multitasking
06:15 Interrupt Service Routine
08:34 Task Swapper Z80 Assembly code
10:37 Square wave generator for Interrupts
12:02 Multitasking demo on the TEC-1G

Hi there,

I have mentioned this before here, So, back in the 80’s I worked for a company called Computerm…in Pittsburgh PA. :backhand_index_pointing_left: :grin: Voted Best city Too, Go Steelers!

They emulated and coupled devices on the IBM BUS & TAG arcitecture for IBM systems, 3070-3080’s and more. they used Z-80 B’s in boards on both ends of a Switched 56K ISDN Channel pairs phone line pairs(4) in between. The first HIGH Speed SDLC on the globe. They developed a similar proprietary OS, or monitor System that ran both ends, Emulator on one side & couple on the other, each had a stack of boards all containing at least one Z-80 and some windows eeprom chips and let’s not forget those great peripheri-ie some SIO’s PIO’s CTC’s and a DUART :grin: console ports.

I don’t care what anyone says… that stuff was bullet proof.
and Great video. :+1:

it was for banks, the (IBM)host were in Chicago <—> the check printers and terminals were in Atlanta… The host never knew the difference, same as the peripherals. everything appeared LOCAL. :smile:

GL :slight_smile: PJ :v:

1 Like

… I think it is important to remember the past to build the future… I remember I had a Commadore Vic 20 and I remember reading the manual and Peek and Poke and all that stuff you type… hexadecimal ? what da? I didnt understand why anyone needed more than just regular numbers… i thought it was a unit conversoin to make you fail a test… Binary? what da? is this Algebra…but i never understood what i was doing or how it really worked… I wish I had the knowledge back then..

1 Like