Note: This API call is for DOS and Win16 personality only. Use Family API for portability.
2 and higher
TERMINATE AND STAY RESIDENT
AH = 31h AL = return code DX = number of paragraphs to keep resident
never returns
the value in DX only affects the memory block containing the PSP; additional memory allocated via AH=48h is not affected
the minimum number of paragraphs which will remain resident is 11h for DOS 2.x and 06h for DOS 3.0+
most TSRs can save some memory by releasing their environment block before terminating (see #01378 at AH=26h,AH=49h)
any open files remain open, so one should close any files which will not be used before going resident; to access a file which is left open from the TSR, one must switch PSP segments first (see AH=50h)
Text based on Ralf Brown Interrupt List Release 61
osFree Macro Library | |
---|---|
Video I/O | @SetMode @SetCurSz @SetCurPos @GetCur @SetPage @ScrollUp @ScrollDn @Scroll @GetChAtr @PutChAtr @PutCh @SetPalet @SetColor @SetDot @GetDot @WrtTTY @VideoState @GetMode @GetDisplay @GetVideoState @GetEGAInfo @Cls |
Hardware info | @Equipment @MemSize |
Serial I/O | @AuxInit @AuxSendChar @AuxRecieveChar @AuxStatus |
Tape I/O | @TapeOn @TapeOff @TapeRead @TapeWrite |
Keyboard I/O | @KbdStatus @CharIn @CharPeek |
Printer I/O | @PrnPrint @PrnInit @PrnStatus |
Disk I/O | @DskReset @DskStatus @DskRead @DskWrite @DskVerify @DskFormat |
Date and Time | @SetTime @GetTime |
Mouse | @MouInit @MouShowPointer @MouStatus @MouSetPos @MouSetMickey @MouRegion |
Memory manager | @ModBlok SET_BLOCK |