Jump to content

DevHelp ABIOSCall: Difference between revisions

From EDM2
Created page with "==Description== This service starts an ABIOS function for the Operating System Transfer Convention. ==Syntax== <PRE> USHORT APIENTRY DevHelp_ABIOSCall (USHORT Lid, ..."
 
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
==Description==
This service starts an ABIOS function for the Operating System Transfer Convention.  
This service starts an ABIOS function for the Operating System Transfer Convention.  


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


==Parameters==
==Parameters==
Lid (USHORT) - (input) - Logical ID
;Lid (USHORT) - (input):Logical ID
 
;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 errors:
Possible errors:
              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==
Line 37: Line 30:
==Example Code==
==Example Code==
=== C ===
=== C ===
Calling Sequence in C
<PRE>
<PRE>
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
#include  "abios.h"
 
#include  "dhcalls.h"
Calling Sequence in C
 
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
 
    #include  "abios.h"
    #include  "dhcalls.h"


USHORT APIENTRY DevHelp_ABIOSCall (USHORT Lid,
USHORT APIENTRY DevHelp_ABIOSCall (USHORT Lid,
Line 53: Line 41:


===Assembler===
===Assembler===
Calling Sequence in Assembler
<PRE>
<PRE>
Calling Sequence in Assembler
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
MOV  AX,LID              ; Logical ID
MOV  AX,LID              ; Logical ID
MOV  SI,RB_Offset        ; Offset in data segment to ABIOS request block
MOV  SI,RB_Offset        ; Offset in data segment to ABIOS request block
Line 67: Line 52:


CALL  [Device_Help]
CALL  [Device_Help]
 
</PRE>
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
 
Results in Assembler
Results in Assembler
 
<PRE>
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
 
   'C' Clear if successful.
   'C' Clear if successful.
       The ABIOS service is invoked.
       The ABIOS service is invoked.
Line 84: Line 65:
               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:The OS/2 API Project]]
[[Category:The OS/2 API Project]]

Revision as of 22:45, 18 January 2017

This service starts an ABIOS function for the Operating System Transfer Convention.

Syntax

USHORT APIENTRY DevHelp_ABIOSCall (USHORT Lid,
                                   NPBYTE ReqBlk,
                                   USHORT Entry_Type)

Parameters

Lid (USHORT) - (input)
Logical ID
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 errors:

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

Remarks

ABIOSCall sets up the stack for the call to ABIOS. The indicated ABIOS function is called according to the Operating System Transfer Convention. When the ABIOS function returns, ABIOSCall 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 device driver's data segment.

Example Code

C

Calling Sequence in C

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

USHORT APIENTRY DevHelp_ABIOSCall (USHORT Lid,
                                   NPBYTE ReqBlk,
                                   USHORT Entry_Type)

Assembler

Calling Sequence in Assembler

MOV   AX,LID              ; Logical ID
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_ABIOSCall

CALL  [Device_Help]

Results in Assembler

   'C' Clear if successful.
       The ABIOS service 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)