Jump to content

DosCLIAccess: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
{{Legacy
|RepFunc=N/A
|Remarks=This function has been eliminated since OS/2 2.0.
}}
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==
  DosCLIAccess ( )
  DosCLIAccess ()


==Parameters==
==Parameters==
Line 12: Line 8:


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


==Remarks==
==Remarks==
Line 28: Line 23:
USHORT  rc = DosCLIAccess(VOID);
USHORT  rc = DosCLIAccess(VOID);


 
USHORT rc;            /* return code */
USHORT           rc;            /* return code */
</PRE>
</PRE>
'''Example'''
'''Example'''
Line 50: Line 44:
Returns WORD
Returns WORD
</PRE>
</PRE>
==Related Functions==
==Related Functions==
*  
* [[DosPortAccess]]


[[Category:Dos]]
[[Category:Dos]]

Revision as of 01:15, 5 November 2019

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

Syntax

DosCLIAccess ()

Parameters

none

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.

Example Code

C Binding

#define INCL_DOSDEVICES

USHORT  rc = DosCLIAccess(VOID);

USHORT  rc;            /* return code */

Example

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

#define INCL_DOSDEVICES

USHORT rc;

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

MASM Binding

EXTRN  DosCLIAccess:FAR
INCL_DOSDEVICES     EQU 1

CALL   DosCLIAccess

Returns WORD

Related Functions