INT 27h Terminate and stay resident

Action: Terminates execution of the current program but reserves part or all of its memory so that it will not be overwritten by the subsequent programs. The vectors for interrupts 22h to 24h are restored from the program's PSP. Open files are not closed.
On entry: DX = Offset of last byte+1 (relative to the PSP) to be protected
CS = Segment address of PSP
Returns: Nothing
Notes: This interrupt is typically used by programs which are to be re-entered by redirected interrupt vectors, but its use should be strictly avoided unless compatibility with MSDOS v.1 is vital.

The maximum amount of memory that can be theoretically reserved by this function is one segment (64k bytes), but must not be used in .EXE programs. In addition the call does not work correctly when DX contains a value in the range 08000h to 0FFFFh (32 to 64k bytes). The high bit is discarded by MSDOS, resulting in a memory reservation of up to 32K bytes less than expected.

The recommended call instead of this one is INT 21h function 31h, which works correctly and also allows any amount of memory to be reserved.

Original text says "0FFF1h to 0FFFFh (32 to 64k bytes)". I believe this may be a mistake - K