Question about learning Python

Chris Angelico rosuav at gmail.com
Fri Sep 9 16:57:44 EDT 2022


On Sat, 10 Sept 2022 at 06:45, Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:
>
> On Thu, 8 Sep 2022 07:42:19 +1200, dn <PythonList at DancesWithMice.info>
> declaimed the following:
>
> >TSRs? Now that was an ugly period of history! (trying to make a
> >single-process operating system do multi-processing - only to find that
> >many program[me]s assumed they had full use and undisputed control of
> >the computer. Happy days...)
> >
>
>         I laughed when M$ MSDOS (2?) introduced TSRs... My TRS-80 running
> L(S)DOS had similar things at least a year earlier. And these were
> /run-time/ loadable. They called them "filters" (and device drivers were
> also an option). Key-click was one such -- though it also showed some
> quirks (like... If the processor was really busy, the key-board driver
> would buffer key-strokes, but the filter activated when an application
> /read/ the key-board). Filter to control printer formatting, a JobLog
> filter, Key-Stroke Multiply filter (I never used it, but it apparently uses
> a table of special keys and expands them to longer strings). Commands to
> load device drivers (or remove them!). Could even change the number of
> cylinders for a floppy drive -- My drives were "loose" enough to allow my
> to add 2 cylinders.
>

To be fair on MS-DOS, you didn't *have* to use a TSR to hook
interrupts, and the same idea of those filters would work (just hook
the keyboard interrupt in a cooperative way; last installed is first
executed). But the OS offered only one option for a program to run and
put itself somewhere: "terminate process and increase the base segment
address for subsequent processes", which would allow you to leave any
amount of memory (on a sixteen-byte boundary) active.

There's no reason that filters couldn't have been written that blit
themselves into some other part of memory, point some interrupt
vectors there, and then fully terminate. Sure, the OS wouldn't have
offered any protection, but the OS didn't offer any actual protection
anyway. All we'd need is a spare slab of memory for things to put
their code into, one which everyone could allocate and deallocate
from..... oh. Yeah, like virtual memory.

ChrisA


More information about the Python-list mailing list