62
submitted 9 months ago by raduzaharia to c/retrocomputing
you are viewing a single comment's thread
view the rest of the comments
[-] mozz@mbin.grits.dev 5 points 9 months ago

You could install interrupt handlers in DOS more or less as if you were in the kernel of a higher-level OS. It was honestly dead simple -- just "please run this code on an interrupt," and that's exactly what it would do ๐Ÿ™‚. There wasn't any priority or access control; you could request any interrupt, and if you wanted to also have the previous handler run, you had to call it yourself. My guess would be that they just installed a timer interrupt, and every X milliseconds they would just swap the instruction pointer and stack over to a different program, so the programs take turns just like in a memory-protected multitasking OS.

I'm not real familiar with how well you might be able to do memory protection. My guess would be that it all just runs unprotected in the 0-640kb range on an 8088, so your programs had to share and not step on each other, and that some things can be swapped up into 640kb-1mb range on a 286, but I'm not sure on either count. I worked on them but I never really understood the way 8088 and 80286 chips segmented their memory; it was famously fairly bizarre.

But the task scheduling you could absolutely do.

[-] agent_flounder@lemmy.world 2 points 9 months ago

Thanks! I had forgotten about segment registers. Makes more sense now than it did when I first learned about them ages ago.

this post was submitted on 11 Feb 2024
62 points (97.0% liked)

retrocomputing

4161 readers
20 users here now

Discussions on vintage and retrocomputing

founded 2 years ago
MODERATORS