Int 31H Function 0C01H
Terminate and Stay Resident
A resident service provider uses this function after its
initialization to terminate execution while leaving its protected mode
memory (and optionally some real mode memory) allocated.
AX = 0C01H
BL = return code
DX = number of paragraphs (16-byte blocks) of DOS
memory to reserve
Nothing (this call never returns)
- This function should only be used by DPMI clients which only
provide resident services to other DPMI protected mode clients. If
the objective is only to provide resident services to real mode
programs, the client should use the DPMI translation service Int 31H Function 0300H to invoke DOS's Int 21H
Function 31H directly.The value in DX only specifies the size of DOS allocated memory to
reserve. Any protected mode memory owned by the program remains
allocated unless it is explicitly released before executing this
function. Note that the value in DX must either be 0 or a minimum of
6. If DX is 0, the DPMI host executes a DOS real mode terminate
function (Int 21H Function 4CH), and no real mode memory is reserved.
If DX is nonzero, the DPMI host requests the DOS real mode
terminate-and-stay-resident function (Int 21H Function 31H).
- If the client has not made a prior call to Int 31H Function 0C00H, the client will simply
- For further details on programming of resident service providers,
see that page.