This DPMI 0.9 Specification is hosted by Tenberry Software, Inc.

8. Descriptor Management Services, Continued


[Next Section] * [Previous Section] * [DPMI Index]
[Tenberry Home] * [Software Quality] * [DOS/4G] * [DOS/4GW] * [DOS/16M]

8.4 Get Next Selector Increment Value

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

Code Sample:

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;
	}

[Next Section] * [Previous Section] * [DPMI Index]
[Tenberry Home] * [Software Quality] * [DOS/4G] * [DOS/4GW] * [DOS/16M]
This HTML edition of the DPMI 0.9 Specification is hosted by Tenberry Software, Inc., makers of the DOS/16M and the DOS/4G family of DOS extenders. Page last modified 2003.1.28, <webmaster@tenberry.com>