Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Int 21h Function 31h
 Detail                                     Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Interrupt:   21h     Function:   31h
 
  Title:       Terminate and Stay Resident
 
  See also:    Get Interrupt Vector, Set Interrupt Vector, @TSR,
               Terminate and Stay Resident (BIOS)
 
  Description:
 
     Terminates execution of the currently executing program, passing a
     return code to the parent process, but reserves part or all of the
     program's memory so that it will not be overlaid by the next
     transient program to be loaded.
 
     Input                            Output
 
     AH = 31h                         None
     AL = Return code
     DX = Amount of memory to
          reserve (in paragraphs)
                                    -♦-