Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TASM 2.x / MASM 6.x Assembly Language - <b>function 31h (49) terminate and stay resident</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function 31h (49)        Terminate and Stay Resident

    Terminates a process, but keeps a specified portion resident in
    memory.

       On entry:      AH         31h
                      AL         Return code
                      DX         Size of resident portion, in paragraphs

  --------------------------------------------------------------------------

    Function 31h is an enhanced version of DOS Interrupt 27h, Terminate
    and Stay Resident, that offers two extra features: It allows more than
    64K of memory to remain resident, and allows the terminating process
    to report a return code.

       Notes:         This function does not release any memory that was
                      allocated by the terminating process via Function
                      48h (Allocate Memory).

                      The return code may be retrieved by a parent process
                      via Function 4Dh, or tested by means of the
                      ERRORLEVEL feature of DOS batch processing.

                      Open files are not closed by this function.

See Also: INT 27h 4Dh 00h INT 20h

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson