Int 27h Terminate and Stay Resident Superseded
Ends the current program by returning control to its parent
program, but it leaves the program in memory and preserves such
program resources as open files and allocated memory.
Note Int 27h has been superseded. Programs should use
Keep Program (Int 21h, function 31h).
Entry CS = Segment of PSP
DX = Size of resident portion, in bytes
Return This interrupt does not return
──────────────────────────────────────────────────────────────────
This interrupt is intended to be used by .COM programs. When a
program issues Int 27h, the CS register must contain the segment
address of the program segment prefix (PSP).
Int 27h carries out the following actions:
- Sets the new size of the program by converting the value passed
in the DX register to a corresponding number of paragraphs and
reallocating the program memory. Program memory includes only
the PSP and program data and code. The reallocation does not
affect the program's environment block, nor does it affect the
memory allocated by the program after it was loaded.
- Flushes the file buffers but leaves files open.
- Restores interrupt 22h, 23h, and 24h vectors from the addresses
saved in the PSP.
- Transfers control to the address specified by offset 0Ah
(termination address) in the PSP.