Live data from Hacker News

Pre-emptive Z80 multitasking explainer

github.com

21–30 of 33 posts

Re: Pre-emptive Z80 multitasking explainer

#22

Earlier quoted context omitted.

It's hard to imagine getting work done on a shared Z80 machine with everybody sharing the same 64kB of memory. Z80s were already plenty slow and the working memory tight. Sharing that with other users sounds miserable.

I had after school computer classes on a shared 8080 system running MP/M. Worked very, very well.

We had shared S100 8080 systems in our EE lab at university. 7 terminals per CPU. Worked just fine for editing programs. But when everyone started a (Pascal) compile run at the same time, things got plenty slow.

Re: Pre-emptive Z80 multitasking explainer

#23

Earlier quoted context omitted.

It wasn't unusual for larger-scale microcomputers to have bank switching in the late 1970s to the mid-1980s. RAM chips usually have a "chip enable" pin, you might have chips that have 4k of addresses that are 8 bits wide [1] and fill out the 64k address space by having 16 RAM chips, feeding the least significant 12 bits to the RAM chips and the most 4 bits to a multiplexer that goes to the 16 RAM chips. All of the RA…

> 128MB (minimum), 512MB (max from radio shack) I think you meant KB here but now im also wondering how many MB you -could- actually scale tp and what the overhead would be due to the numbers of banks to switch between...

I fixed the mistake… thanks!

Re: Pre-emptive Z80 multitasking explainer

#24

Earlier quoted context omitted.

Unless you mean that a physically moving part caused the banks to switch then "mechanically" is the wrong word here. If that is how the bank switching was done then that's fascinating and very very surprising and I would love to hear more about it.

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.

Re: Pre-emptive Z80 multitasking explainer

#25

Writing 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…

Ah, that brings back memories. I was using Intel iRMX on a commercial system in the mid 80s, and wanted to write a multitasking program on my IBM XT.

So I wrote a pre-emptive multitasking iRMX clone in C and a bit of assembler. Ended up using it to develop a mildly successful POS system running on a single PC with several VT100 terminals attached.

Re: Pre-emptive Z80 multitasking explainer

#27

Earlier quoted context omitted.

I had after school computer classes on a shared 8080 system running MP/M. Worked very, very well.

We had shared S100 8080 systems in our EE lab at university. 7 terminals per CPU. Worked just fine for editing programs. But when everyone started a (Pascal) compile run at the same time, things got plenty slow.

I’d note those competed with minicomputers, my high school had a PDP-8 circa 1981 when I was taking a few classes there while still in elementary school. The PDP-8 could support three terminals of interactive BASIC or could be brought up in a single user mode where you got more memory and could run bigger programs like the Crowther & Woods ADVENTURE. A bigger school has a PDP-11 with about 20 terminals. By 1985 or so my school got a VAX-11/730 which is basically like a modern computer.

Re: Pre-emptive Z80 multitasking explainer

#28

If 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

It's hard to imagine getting work done on a shared Z80 machine with everybody sharing the same 64kB of memory. Z80s were already plenty slow and the working memory tight. Sharing that with other users sounds miserable.

Multiuser machines could get away with surprisingly little memory; They had some major advantages over home computers:

Users were all connected via CRT terminals over serial, so you didn't need to waste any memory on screen buffers. This also reduced CPU usage as the user wouldn't get any CPU time until they pressed a key, and the scheduler might queue up multiple key presses before even switching to the user's task (while still showing immediate feedback)

They also had superior IO. Home computers were connected to slow floppy drives (at best, some were still using tape) so they typically tried to keep the whole working set in memory. But multi-user machines had relatively fast hard drives and could afford to shuffle the working set in and out of memory as needed, with DMAs handling the actual transfer in the background.

As others have pointed out, these machines had bank switching. But I doubt such machines were ever configured with more than 256k of memory, with 128k being more typical. Wikipedia claims 32k was the absolute minimum, but with very little free memory, so I suspect 64k would be enough for smaller offices with 4-6 users.

Re: Pre-emptive Z80 multitasking explainer

#30

Earlier quoted context omitted.

We had shared S100 8080 systems in our EE lab at university. 7 terminals per CPU. Worked just fine for editing programs. But when everyone started a (Pascal) compile run at the same time, things got plenty slow.

I’d note those competed with minicomputers, my high school had a PDP-8 circa 1981 when I was taking a few classes there while still in elementary school. The PDP-8 could support three terminals of interactive BASIC or could be brought up in a single user mode where you got more memory and could run bigger programs like the Crowther & Woods ADVENTURE. A bigger school has a PDP-11 with about 20 terminals. By 1985 or so…

Yes, at my first job, we had a VAX 11/785 which ran an entire engineering department. About 30-40 terminals.
Post reply on HN