52 lines
1.7 KiB
HTML
52 lines
1.7 KiB
HTML
|
|
|
|
<h2>Terminate and Stay Resident
|
|
<img src="../1.0.gif" alt="[1.0]" width=22 height=17></h2>
|
|
|
|
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.<p>
|
|
|
|
<b>Call With</b><br>
|
|
<img src="r/ax+bl+dx.gif" alt="" width=245 height=59><br>
|
|
|
|
AX = 0C01H<br>
|
|
BL = return code<br>
|
|
DX = number of paragraphs (16-byte blocks) of DOS
|
|
memory to reserve<p>
|
|
|
|
<b>Returns</b><br>
|
|
|
|
Nothing (this call never returns)
|
|
|
|
<h2>Notes</h2><ul>
|
|
|
|
|
|
<li>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 <a
|
|
href="310300.html">Int 31H Function 0300H</a> to invoke DOS's Int 21H
|
|
Function 31H directly.<p.
|
|
|
|
<li>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).<p>
|
|
|
|
|
|
<li>If the client has not made a prior call to <a
|
|
href="310c00.html">Int 31H Function 0C00H</a>, the client will simply
|
|
be terminated.<p>
|
|
|
|
<li>For further details on programming of resident service providers,
|
|
see <a href="../ch4.8.html">that page</a>.<p>
|
|
|
|
</ul>
|
|
|
|
|