Terminate and stay resident program
In computers, a terminate and stay resident program (commonly referred to by the initialism TSR) is a computer program that uses a system call in DOS operating systems to return control of the computer to the operating system, as though the program has quit, but stays resident in computer memory so it can be reactivated by a hardware or software interrupt. This technique partially overcame DOS operating systems' limitation of executing only one program, or task, at a time. TSR is unique to DOS and not used in Windows.
Some terminate and stay resident programs were utility programs that a computer user might call up several times a day, while working in another program, using a hotkey. Borland Sidekick was an early and popular example of this type. Other TSRs serve as device drivers for hardware that the operating system did not directly support.
Using TSRs
Normally in DOS operating systems, only one program can run at any given time. To stop running, it gives control back to the DOS shell program, COMMAND.COM, using the system call INT 21h/4Ch. The memory and system resources that were used by the program are then marked as unused. This in effect makes it impossible to restart parts of it again without reloading it from scratch. However, if a program ends with the system call INT 27h or INT 21h/31h, the operating system does not reuse a certain specified part of the program's memory.