Some functions such as Allocate Descriptors and Allocate DOS Memory can return more than one descriptor. You must call this function to determine the value that must be added to a selector to access the next descriptor in the array.
To Call
AX = 0003h
Returns
Carry flag clear (this function always succeeds)
AX = Value to add to get to next selector
Programmer's Notes
The following function compiles with Watcom C/C++ version 11.0 or later, and Microsoft Visual C/C++ version 4.0 or later:
// Get difference between consecutive descriptors
int dpmiGetSelectorIncrementValue(void)
{
unsigned short increment; // increment value
__asm {
mov eax, 0x003 // call dpmi host to do mapping
int 0x31
mov increment, ax // save error code from DPMI, if any
}
// return the increment
return increment;
}