Xlat_API_Return_Ptr

Xlat_API_Return_Ptr Segment, Offset


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

Parameters

Segment

Specifies the register to receive the selector for the returned address.

Offset

Specifies the register to receive the offset for the returned address.

Return Value

This macro has no return value.

Comments

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.

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.

This service fails if it can not create an appropriate LDT selector.

Example

On PS/2 machines, Interrupt 15h Function 0C0h returns a pointer in the ES:BX register pair that points to hardware information. The following script translates this function:

Get_Machine_Info:

Xlat_API_Return_Ptr es, bx

Xlat_API_Exec_Int 15h

See Also

Xlat_API_Exec_Int, Xlat_API_Return_Seg