Aura
DPMI Memory Interface (dpmi_mem.asm)
_AllocMem
- Inputs: Size=size (in bytes) of block to allocate
- Outputs: AX=internal handle to memory block (-1 if error)
Calls DPMI to allocate memory block and manages all handles, etc, needed to
correctly access it.
_FreeMem
- Inputs: Handle=internal handle to free
- Outputs: None
Frees memory block allocated by _AllocMem.
_LockMem
- Inputs: Handle=internal handle to lock
- Outputs: AX=selector to locked memory block (0 if error).
Calls DPMI to lock memory block.
_UnlockMem
- Inputs: Handle=internal handle to unlock
- Outputs: None
Calls DPMI to unlock memory block. Note: invalidates selector returned by
_LockMem!
_GetPhysicalMapping
- Inputs: PhysicalAddress=32-bit physical address; Size=size (in bytes)
of region to get mapping for
- Outputs: *LinearAddress=linear mapping; *Selector=selector to access memory;
AL=1 on error.
Maps a physical memory location into a linear address and then allocates a
selector to access it. This is used by the VESA routines to get a pointer
to graphics RAM.
_FreePhysicalMapping
- Inputs: *LinearAddress=linear mapping; *Selector=selector to access memory
- Outputs: None
Frees the resources allocated by _GetPhysicalMapping.