include vmm.inc VMMcall _SelectorMapFlat, <VM, Selector, flags> cmp eax, 0FFFFFFFFh ; 0FFFFFFFFh if error je error mov [Address], eax ; base address of selector |
The _SelectorMapFlat service returns the base address of the specified GDT or LDT selector. 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.
VM
Specifies a handle identifying 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
Specifies a GDT or LDT selector.
flags
Specifies the operation flags. This parameter must be set to 0.
The EAX register contains the linear address of the base of the selector if the service is successful. Otherwise, EAX contains 0FFFFFFFFh to indicate an error, such as an invalid selector.
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.
EAX