Jump to content

DevHelp ABIOSCommonEntry: Difference between revisions

From EDM2
Created page with "==Description== This service starts an ABIOS common entry point according to the Advanced BIOS Transfer Convention. ==Syntax== <PRE> USHORT APIENTRY DevHelp_ABIOSCommonEntry..."
 
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Description==
{{DISPLAYTITLE:DevHelp_ABIOSCommonEntry}}
This service starts an ABIOS common entry point according to the Advanced BIOS Transfer Convention.  
This service starts an ABIOS common entry point according to the Advanced BIOS Transfer Convention.


==Syntax==
==Syntax==
<PRE>
USHORT APIENTRY DevHelp_ABIOSCommonEntry (NPBYTE ReqBlk, USHORT Entry_Type)
USHORT APIENTRY DevHelp_ABIOSCommonEntry (NPBYTE ReqBlk,
                                          USHORT Entry_Type)
</PRE>


==Parameters==
==Parameters==
; ReqBlk (NPBYTE): - input - Offset in data segment to ABIOS request block
;''ReqBlk'' (NPBYTE) - input:Offset in data segment to ABIOS request block
;''Entry_Type'' ([[USHORT]]) - input:Specifies entry point
::ABIOS_EP_START    start
::ABIOS_EP_INTERRUPT interrupt
::ABIOS_EP_TIMEOUT  timeout


; Entry_Type (USHORT): - input - Specifies entry point
                              ABIOS_EP_START      start
                              ABIOS_EP_INTERRUPT  interrupt
                              ABIOS_EP_TIMEOUT    timeout
==Return Code==
==Return Code==
Success indicator: 0
Success indicator: 0


Possible error:
Possible error:
              ERROR_LID_DOES_NOT_EXIST     (0x02)
:ERROR_LID_DOES_NOT_EXIST (0x02)
              ERROR_ABIOS_NOT_PRESENT     (0x03)
:ERROR_ABIOS_NOT_PRESENT   (0x03)
              ERROR_NOT_YOUR_LID           (0x04)
:ERROR_NOT_YOUR_LID       (0x04)
              ERROR_INVALID_ENTRY_POINT   (0x05)
:ERROR_INVALID_ENTRY_POINT (0x05)
 
==Remarks==
==Remarks==
ABIOSCommonEntry sets up the stack for the call to one of the Advanced BIOS common entry points. It then invokes the indicated ABIOS common entry point. On return from the ABIOS function, ABIOSCommonEntry cleans up the stack before returning to the physical device driver.
ABIOSCommonEntry sets up the stack for the call to one of the Advanced BIOS common entry points. It then invokes the indicated ABIOS common entry point. On return from the ABIOS function, ABIOSCommonEntry cleans up the stack before returning to the physical device driver.


The DS register must point to the physical device driver's data segment. If the DS register was used in a previous call to PhysToVirt, it must be reset to the data segment of the physical device driver.  
The DS register must point to the physical device driver's data segment. If the DS register was used in a previous call to PhysToVirt, it must be reset to the data segment of the physical device driver.


==Example Code==
==Example Code==
Line 33: Line 30:
Calling Sequence in C
Calling Sequence in C
<PRE>
<PRE>
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
#include  "abios.h"
 
#include  "dhcalls.h"
 
 
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
 
    #include  "abios.h"
    #include  "dhcalls.h"


USHORT APIENTRY DevHelp_ABIOSCommonEntry (NPBYTE ReqBlk,
USHORT APIENTRY DevHelp_ABIOSCommonEntry (NPBYTE ReqBlk,
                                           USHORT Entry_Type)
                                           USHORT Entry_Type)
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
</PRE>
</PRE>


Line 52: Line 40:
Calling Sequence in Assembler
Calling Sequence in Assembler
<PRE>
<PRE>
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
MOV  SI,RB_Offset          ; Offset in data segment to ABIOS request block
MOV  SI,RB_Offset          ; Offset in data segment to ABIOS request block
MOV  DH,Entry_Point        ; Specifies entry point
MOV  DH,Entry_Point        ; Specifies entry point
Line 63: Line 48:


CALL  [Device_Help]
CALL  [Device_Help]
 
</PRE>
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
 
Results in Assembler
Results in Assembler
 
<PRE>
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
 
   'C' Clear if successful.
   'C' Clear if successful.
       The ABIOS common entry point is invoked.
       The ABIOS common entry point is invoked.
Line 80: Line 61:
               ERROR_NOT_YOUR_LID          (0x04)
               ERROR_NOT_YOUR_LID          (0x04)
               ERROR_INVALID_ENTRY_POINT    (0x05)
               ERROR_INVALID_ENTRY_POINT    (0x05)
</PRE>
</PRE>


==Related Functions==
[[Category:DevHlps]]
*
 
[[Category:The OS/2 API Project]]

Latest revision as of 18:05, 23 May 2025

This service starts an ABIOS common entry point according to the Advanced BIOS Transfer Convention.

Syntax

USHORT APIENTRY DevHelp_ABIOSCommonEntry (NPBYTE ReqBlk, USHORT Entry_Type)

Parameters

ReqBlk (NPBYTE) - input
Offset in data segment to ABIOS request block
Entry_Type (USHORT) - input
Specifies entry point
ABIOS_EP_START start
ABIOS_EP_INTERRUPT interrupt
ABIOS_EP_TIMEOUT timeout

Return Code

Success indicator: 0

Possible error:

ERROR_LID_DOES_NOT_EXIST (0x02)
ERROR_ABIOS_NOT_PRESENT (0x03)
ERROR_NOT_YOUR_LID (0x04)
ERROR_INVALID_ENTRY_POINT (0x05)

Remarks

ABIOSCommonEntry sets up the stack for the call to one of the Advanced BIOS common entry points. It then invokes the indicated ABIOS common entry point. On return from the ABIOS function, ABIOSCommonEntry cleans up the stack before returning to the physical device driver.

The DS register must point to the physical device driver's data segment. If the DS register was used in a previous call to PhysToVirt, it must be reset to the data segment of the physical device driver.

Example Code

C

Calling Sequence in C

#include  "abios.h"
#include  "dhcalls.h"

USHORT APIENTRY DevHelp_ABIOSCommonEntry (NPBYTE ReqBlk,
                                          USHORT Entry_Type)

Assembler

Calling Sequence in Assembler

MOV   SI,RB_Offset           ; Offset in data segment to ABIOS request block
MOV   DH,Entry_Point         ; Specifies entry point
                             ; 0 = start
                             ; 1 = interrupt
                             ; 2 = timeout
MOV   DL,DevHlp_ABIOSCommonEntry

CALL  [Device_Help]

Results in Assembler

   'C' Clear if successful.
       The ABIOS common entry point is invoked.

   'C' Set if error.
       AX = Error code.
            Possible errors:
               ERROR_LID_DOES_NOT_EXIST     (0x02)
               ERROR_ABIOS_NOT_PRESENT      (0x03)
               ERROR_NOT_YOUR_LID           (0x04)
               ERROR_INVALID_ENTRY_POINT    (0x05)