Allocates Size bytes of memory by extending DS.
Size, the amount of memory (in bytes) to allocate.
Returns starting offset of allocated memory, or -1 on error.
This function works by extending the limit of the DS selector by Size bytes and returning the old limit.
There is no FreeMem() function; all allocated memory is freed upon program exit.
Allocates a memory block of Size bytes in a new selector.
Size, the amount of memory to allocate.
Returns new selector for the memory block, or -1 on error.
Can only allocate a maximum of MAXMEMHANDLES memory blocks.
Frees a memory block allocated by AllocSelector().
Selector, the selector of the memory block to free.
None
No error checking on Selector value.
Locks an area of memory so it is safe for an interrupt handler to access.
Selector, selector of the area to lock (e.g. DS).
Offset, offset from start of segment of the beginning of the area to lock.
Length, length of the area to lock.
Returns 1 on error, 0 on success.
Maps a physical memory region into linear (program) memory space.
PhysicalAddress, the starting address of the physical memory region to map.
Size, size of the region, in bytes.
LinearAddress, the linear address of the mapped region.
Selector, a selector that can be used to access the region.
Returns 1 on error, 0 on success.
Some outputs are passed as parameters; pass the address of a variable, and after a successful call, the variable will be filled with the output information.
Frees the resources allocated by GetPhysicalMapping().
LinearAddress, the linear address of the mapping to free.
Selector, the selector used to point to mapped memory block.
LinearAddress and Selector cleared to 0.
This function takes the addresses of LinearAddress and Selector, not their contents.