Xlat_API_Return_Ptr

Xlat_API_Return_Ptr  Segment, Offset
 

Gets the protected-mode address pointing to data retrieved by a function. This macro is used for functions that return addresses.

Segment
Register to receive the selector for the returned address.
Offset
Register to receive the offset for the returned address.

For 16-bit protected-mode applications, this macro creates an LDT selector if an appropriate selector does not already exist. For 32-bit protected-mode applications, the macro always returns the same selector as the V86MMGR_VM_Flat_Selector service and adjusts the offset to point to the data. The V86MMGR_Xlat_API service fails if it can not create an appropriate LDT selector.

Although this macro is placed before the Xlat_API_Exec_Int macro in a translation script, the returned address is created after the interrupt has been executed.

The following example translates the return value of Interrupt 15h Function 0C0h. On PS/2 computers, this function returns a pointer to hardware information in the ES:BX register pair.

Get_Machine_Info:
    Xlat_API_Return_Ptr es, bx
    Xlat_API_Exec_Int   15h