That was how DOS did a lot of things. For example, keyb.com is a program that adds support for different keyboard layouts (the default BIOS keyboard handler can only deal with American keyboards). It does that by overriding interrupts 15h and 16h, and also a couple of others. Or subst.com basically just overloading interrupt 21h, rewriting DOS system calls.eekee wrote: That ties together the two topics of this post, because how would a DOS shell redirect program output to memory? By temporarily replacing the software interrupt vectors for output.
This is also DOS's biggest weakness: Once a TSR is added to the system, it cannot be removed again in a standard way. On Linux, you can kill a hanging process (unless it is hanging in non-interruptible sleep, but that is more of a hardware issue), and you can even unload kernel modules, but on DOS, a TSR is here to stay.