INT 31H 0100H: Allocate DOS Memory Block
Compatibility: DPMI 1.0+
Expects: AX 0100H
BX size of allocation, in 16-byte paragraphs
Returns: CF NC (clear) if successful
else AX = DPMI Error Code
BX = size of largest available block, in 16-byte pares
AX real-mode segment base address of allocated block
DX selector for allocated block
Info: This allocates a block of memory from the DOS pool (i.e., memory
below the 1MB mark). It returns both a real-mode segment address
and a protected-mode selector.
This is typically used by programs which wish to share memory
between a real-mode app and a protected mode app.
BX if this is > 1000H (a request for more than 64K), and if the
caller is in 16-bit mode, then the value returned in DX is
actually a base selector (the first in a series). Use
INT 31H 0003H to see how much to add to this selector to access
the data above 64K.
Each selector will have a limit of 64K except the last one whose
limit is set to cover the remaining area.
Note: You must not modify the LDT descriptor entry(s) represented by
the returned selector(s). Use INT 31H 0101H to deallocate or use
INT 31H 0102H to resize.
See Also: DPMI API
INT 2fH: Multiplex Interrupt