Table of Contents

Note: This API call is for DOS and Win16 personality only. Use Family API for portability.

2018/09/07 05:04 · prokushev · 0 Comments

Int 21H, AH=31H

Version

2 and higher

Brief

TERMINATE AND STAY RESIDENT

Family API

Input

      AH = 31h
      AL = return code
      DX = number of paragraphs to keep resident

Return

never returns

Notes

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)

See also

AH=00h,AH=4Ch,AH=4Dh,INT 20,INT 22,INT 27

Note

Text based on Ralf Brown Interrupt List Release 61

2018/09/04 17:23 · prokushev · 0 Comments