Jump to content

DosCLIAccess: Difference between revisions

From EDM2
Ak120 (talk | contribs)
Ak120 (talk | contribs)
mNo edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[image:legacy.png]]
{{Legacy
This function has been eliminated since OS/2 2.0 [https://books.google.com.ec/books?id=u7WbsmbttwYC&pg=PT372&lpg=PT372&dq#v=onepage&q&f=false]
|RepFunc=N/A
 
|Remarks=This function has been eliminated since OS/2 2.0. [http://books.google.com/books?id=u7WbsmbttwYC&pg=PT372]
==Description==
}}
This call requests I/O privilege for disabling and enabling interrupts. Access to ports must be granted with DosPortAccess.  
This call requests I/O privilege for disabling and enabling interrupts. Access to ports must be granted with DosPortAccess.


==Syntax==
==Syntax==
<PRE>
  DosCLIAccess ()
  DosCLIAccess
 
    ( )
</PRE>
==Parameters==


==Return Code==
==Return Code==
rc (USHORT) - return
;rc (USHORT) - return:Return code descriptions are:
*0 NO_ERROR


Return code descriptions are:
*0    NO_ERROR
==Remarks==
==Remarks==
Applications that only use CLI/STI in IOPL segments must request CLI/STI privilege from the operating system.
Applications that only use CLI/STI in IOPL segments must request CLI/STI privilege from the operating system.


Applications that use IN/OUT instructions to I/O ports must request I/O privilege with DosPortAccess. (See DosPortAccess for more detail.) Request for port access also grants CLI/STI privilege from the operating system.  
Applications that use IN/OUT instructions to I/O ports must request I/O privilege with [[DosPortAccess]]. Request for port access also grants CLI/STI privilege from the operating system.


==Example Code==
==Bindings==
===C Binding===
===C===
<PRE>
<PRE>
#define INCL_DOSDEVICES
#define INCL_DOSDEVICES


USHORT  rc = DosCLIAccess(VOID);
USHORT  rc = DosCLIAccess(VOID);
USHORT  rc;            /* return code */
</PRE>


===MASM===
<PRE>
EXTRN  DosCLIAccess:FAR
INCL_DOSDEVICES    EQU 1
CALL  DosCLIAccess


USHORT          rc;            /* return code */
Returns WORD
</PRE>
</PRE>
'''Example'''


==Example==
This example requests I/O privilege for disabling and enabling interrupts.
This example requests I/O privilege for disabling and enabling interrupts.
<PRE>
<PRE>
#define INCL_DOSDEVICES
#define INCL_DOSDEVICES
Line 45: Line 45:
   rc = DosCLIAccess();      /* Request I/O privilege */
   rc = DosCLIAccess();      /* Request I/O privilege */
</PRE>
</PRE>
===MASM Binding===
<PRE>
EXTRN  DosCLIAccess:FAR
INCL_DOSDEVICES    EQU 1
CALL  DosCLIAccess
Returns WORD
</PRE>
==Related Functions==
*


[[Category:The OS/2 API Project]]
[[Category:Dos16]]

Latest revision as of 00:30, 5 October 2023

Legacy Function Warning
It is recommended to use a newer replacement for this function.
Replacement: N/A
Remarks: This function has been eliminated since OS/2 2.0. [1]

This call requests I/O privilege for disabling and enabling interrupts. Access to ports must be granted with DosPortAccess.

Syntax

DosCLIAccess ()

Return Code

rc (USHORT) - return
Return code descriptions are:
  • 0 NO_ERROR

Remarks

Applications that only use CLI/STI in IOPL segments must request CLI/STI privilege from the operating system.

Applications that use IN/OUT instructions to I/O ports must request I/O privilege with DosPortAccess. Request for port access also grants CLI/STI privilege from the operating system.

Bindings

C

#define INCL_DOSDEVICES

USHORT  rc = DosCLIAccess(VOID);
USHORT  rc;            /* return code */

MASM

EXTRN  DosCLIAccess:FAR
INCL_DOSDEVICES     EQU 1

CALL   DosCLIAccess

Returns WORD

Example

This example requests I/O privilege for disabling and enabling interrupts.

#define INCL_DOSDEVICES

USHORT rc;

   rc = DosCLIAccess();      /* Request I/O privilege */