Jump to content

DevHelp VirtToLin: Difference between revisions

From EDM2
Created page with "This service converts a selector:offset pair into a linear address. ==Syntax== ===C=== <PRE> USHORT APIENTRY DevHelp_VirtToLin( SEL Selector, ..."
 
No edit summary
 
Line 1: Line 1:
{{DISPLAYTITLE:DevHelp_VirtToLin}}
This service converts a selector:offset pair into a linear address.  
This service converts a selector:offset pair into a linear address.  



Latest revision as of 00:21, 23 May 2025

This service converts a selector:offset pair into a linear address.

Syntax

C

USHORT APIENTRY DevHelp_VirtToLin( SEL    Selector,
                                   ULONG  Offset,
                                   PLIN   LinearAddr)

Assembler

MOV   AX,Selector          ; Selector in  Selector:Offset
MOV   ESI,Offset           ; Offset in Selector:Offset
MOV   DL,DevHlp_VirtToLin

CALL  [Device_Help]

Parameters

C

Selector (SEL)
Selector in the selector:offset
Offset (ULONG)
Offset in the selector:offset
LinearAddr (PLIN)
Linear address to be returned

Assembler

MOV   AX,Selector          ; Selector in  Selector:Offset
MOV   ESI,Offset           ; Offset in Selector:Offset

Return Code

C

Success Indicator: 0

Possible errors: Linear address not obtained.

Assembler

   'C' Clear if Linear address obtained.
       EAX = Linear address.

   'C' Set if linear address not obtained.
       EAX = Error code.

Remarks

None.

Example Code

C

#include  "dhcalls.h"

USHORT APIENTRY DevHelp_VirtToLin( SEL    Selector,
                                   ULONG  Offset,
                                   PLIN   LinearAddr)

Related Functions