The memory-resident portion of an active TSR consists of two parts. One part contains the body of the TSR—the code and data that perform the program's main tasks. The other part contains the TSR's interrupt handlers.
An interrupt handler is a routine that takes control when a specific interrupt occurs. Although sometimes called an “interrupt service routine,” a TSR's handler usually does not service the interrupt. Instead, it passes control to the original interrupt routine, which does the actual interrupt servicing.
Collectively, interrupt handlers ensure that a TSR operates compatibly with the rest of the system. Individually, each handler fulfills at least one of the following functions:
Auditing hardware events that may signal a request for the TSR
Monitoring system status
Determining whether a request for the TSR should be honored, based on current system status