_SelectorMapFlat


include vmm.inc

VMMcall _SelectorMapFlat, <VM, Selector, flags>

cmp     eax, 0FFFFFFFFh         ; 0FFFFFFFFh if error
je      error
mov     [Address], eax          ; base address of selector

Returns the base linear address of segment identified by the specified GDT or LDT selector. Uses EAX, ECX, EDX, and Flags.

VM

Handle of the virtual machine to which the specified selector belongs. This parameter is not used if Selector is a GDT selector. This parameter must be valid for LDT selectors.

Selector

GDT or LDT selector.

flags

Operation flags. Must be 0.

The address mapper uses this service to convert pointers, consisting of selector and offset pairs, to flat-model linear addresses suitable for use as parameters for the _LinMapIntoV86 service.

This service ignores the high 16 bits of the Selector parameter; the 80386 CPU often sets these bits to somewhat random values when doubleword operations are performed on segment registers.

See also _LinMapIntoV86