Client_Ptr_Flat


include vmm.inc

Client_Ptr_Flat LinAddr, Segment, Offset
Client_Ptr_Flat LinAddr, Segment, Offset, USES_EAX

Converts the specified segment:offset or selector:offset or segment:offset pair from the client register into a linear address.

LinAddr

32-bit register to receive the linear address.

Segment

Client segment register containing the segment address or selector to convert.

Offset

Client register containing the address offset to convert. If this optional parameter is not given, the macro converts the address using address offset 0. You can specify either a 16-bit or 32-bit general-purpose register. The macro will use the low word or the full 32-bit register, depending on whether the client is in 16-bit or 32-bit mode.

USES_EAX

If the word USES_EAX is appended to the macro call, the macro will use the EAX register as a scratch register. Normally the macro preserves all registers except LinAddr. The macro is slightly more efficient if it is allowed to damage the EAX register.

The Client_Ptr_Flat macro uses the Map_Flat service.

This example converts the address Client_DS:Client_(E)DX, and places the corresponding linear address in the EAX register:


Client_Ptr_Flat eax, DS, DX

See also Map_Flat