en:docs:fapi:doscliaccess

This is part of Family API which allow to create dual-os version of program runs under OS/2 and DOS

Note: This is legacy API call. It is recommended to use 32-bit equivalent

2021/09/17 04:47 · prokushev · 0 Comments
2021/08/20 03:18 · prokushev · 0 Comments

DosCLIAccess

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

  • 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 */