add directory study
This commit is contained in:
100
study/sabre/os/files/ProtectedMode/DPMI1.0Spec/api/310509.html
Normal file
100
study/sabre/os/files/ProtectedMode/DPMI1.0Spec/api/310509.html
Normal file
@@ -0,0 +1,100 @@
|
||||
|
||||
|
||||
<h2>Map Conventional Memory in Memory Block
|
||||
<img src="../1.0.gif" alt="[1.0]" width=22 height=17></h2>
|
||||
|
||||
Aliases linear addresses below the 1 MB boundary onto the linear
|
||||
addresses of a memory block previously allocated with <a
|
||||
href="310504.html">Int 31H Function 0504H</a>.<p>
|
||||
|
||||
<b>Call With</b><br>
|
||||
<img src="r/ax+ebx+ecx+edx+esi.gif" alt="" width=245 height=59><br>
|
||||
|
||||
AX = 0509H<br>
|
||||
ESI = memory block handle<br>
|
||||
EBX = offset within memory block of page(s) to be
|
||||
mapped (must be page-aligned)<br>
|
||||
ECX = number of pages to map<br>
|
||||
EDX = linear address of conventional memory (must be
|
||||
page-aligned)<p>
|
||||
|
||||
<b>Returns</b><br>
|
||||
<img src="r/ax+c.gif" alt="" width=245 height=59><br>
|
||||
|
||||
<i>if function successful</i><br>
|
||||
Carry flag = clear<p>
|
||||
|
||||
<i>if function unsuccessful</i><br>
|
||||
Carry flag = set<br>
|
||||
AX = <a href="errors.html">error code</a>
|
||||
|
||||
<table border=1 cellspacing=0 cellpadding=4>
|
||||
|
||||
<tr><td>8001H</td><td>unsupported function (Conventional Memory
|
||||
Mapping Capability not supported)</td></tr>
|
||||
<tr><td>8003H</td><td>system integrity (invalid conventional
|
||||
memory address)</td></tr>
|
||||
<tr><td>8023H</td><td>invalid handle (in ESI)</td></tr>
|
||||
<tr><td>8025H</td><td>invalid linear address (specified range
|
||||
is not within specified block, or EBX/EDX
|
||||
is not page aligned)</td></tr>
|
||||
</table>
|
||||
|
||||
<h2>Notes</h2><ul>
|
||||
|
||||
|
||||
<li>16-bit DPMI hosts will not support this function. A 16-bit client
|
||||
of a 32-bit DPMI 1.0 host can use this function.<p>
|
||||
|
||||
<li>Support of this call by 32-bit DPMI hosts is optional.
|
||||
Application programs or DOS Extenders which require this call in order
|
||||
to run are not DPMI Compliant.<p>
|
||||
|
||||
<li>Any committed or mapped pages resided in the linear address range
|
||||
that is being mapped into will be uncommitted or unmapped
|
||||
automatically by the host.<p>
|
||||
|
||||
<li>A client may only map conventional memory that it already owns;
|
||||
i.e. memory which the client previously allocated with <a
|
||||
href="310100.html">Int 31H Function 0100H</a> or by calling DOS's Int
|
||||
21H Function 48H directly via the translation services.<p>
|
||||
|
||||
<li>All pages created by this call have the mapped bit (bit 2) set in
|
||||
the attributes returned by the Get Page Attributes function (<a
|
||||
href="310506.html">Int 31H Function 0506H</a>).<p>
|
||||
|
||||
<li>DPMI hosts that do not implement virtual memory can support this
|
||||
function by simply copying page table entries. The entries must be
|
||||
marked as mapped so that the host knows not to free up those physical
|
||||
pages when the memory block is freed.<p>
|
||||
|
||||
<li>DPMI hosts that provide virtual memory must implement some form of
|
||||
page aliasing in order to support this function.<p>
|
||||
|
||||
<li>The function can provide a large contiguous memory space without
|
||||
virtual memory support. <p>
|
||||
|
||||
<li>Implementors of DPMI hosts which do not provide virtual memory are
|
||||
encouraged to support this function. Without this function,
|
||||
conventional memory may be inaccessible to a 32-bit nonsegmented
|
||||
client, because the client may need contiguous linear memory for its
|
||||
code and data. 32-bit clients can always guarantee that conventional
|
||||
memory is not wasted with the following strategy:<ul>
|
||||
|
||||
<li>Call DOS to allocate any free conventional memory
|
||||
|
||||
<li>If the DPMI host supports virtual memory, call the Mark Real Mode
|
||||
Region Pageable function (<a href="310602.html">Int 31H Function
|
||||
0602H</a>) to ensure that the host has not locked down conventional
|
||||
memory.
|
||||
|
||||
<li>If the host does not support virtual memory but supports the Map
|
||||
Conventional Memory function (<a href="310509.html">Int 31H Function
|
||||
0509H</a>), allocate a memory block with uncommitted pages, then use
|
||||
<a href="310509.html">Function 0509H</a> to make the physical memory
|
||||
allocated below 640 KB addressable in the memory block, and therefore
|
||||
useable by the 32-bit application program. </ul><p>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user