What is a TSR?

A TSR (Terminate and Stay Resident) program is a piece of software that is designed to stay in memory once run so you can use it alongside another program.

Today, we take for granted the ability to have multiple applications and utilities running simultaneously. Nearly all present-day operating systems cater for pre-emptive multitasking. In DOS, only a single program could typically be running at any one time. If you wanted to run a different application, you would quit out of your current application (or reboot the PC), and load up the new one.

After you run a TSR, you can then load another program, say, a database, word processor or spreadsheet, and the TSR is usually accessible by using a hot key, such as ALT-F10, or Ctrl-Shift-F1. The currently running program would then be paused, and the TSR would appear on the screen, available for you to use. One of the biggest limitations when writing a TSR was to ensure it used as little memory as possible when running. All DOS programs had to run in the first 640 KB of RAM, including any TSRs. If a TSR was too large, it would prevent the running of larger applications due to lack of remaining memory! Once Expanded Memory was standardised on 386-based systems, TSRs could be loaded into higher memory above the first 640 KB area through the use of DEVICEHIGH and LOADHIGH in the DOS startup files, thereby not restricting memory for main programs.

Popular Early TSRs

Borland's Sidekick, launched in 1984, was an early PIM (Personal Information Manager). It included a personal calendar, text editor (with WordStar-like command interface), calculator, ASCII chart, address book, and phone dialer. With this tool, you could be in your favourite word processor, and call up Sidekick to find out someone's address.

Later versions of DOS itself (both IBM PC-DOS and Microsoft MS-DOS) came with several TSRs, including DOSKEY.EXE, FASTOPEN and PRINT.

Another popular one, also from Borland, was called SuperKey. SuperKey was a TSR that stored and played back keystrokes - this was referred to as a 'macro', and was used to more quickly repeat commands or text in another program.