en:docs:fapi:dosportaccess

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:docs:fapi:dosportaccess [2021/08/20 03:37] – created prokusheven:docs:fapi:dosportaccess [2021/09/17 04:50] (current) prokushev
Line 1: Line 1:
 {{page>en:templates:fapiint}} {{page>en:templates:fapiint}}
 +
 +====== DosPortAccess ======
  
 This call requests or releases access to ports for I/O privilege. This call requests or releases access to ports for I/O privilege.
  
-==Syntax== +===== Syntax =====
- DosPortAccess (Reserved, TypeOfAccess, FirstPort, LastPort)+
  
-==Parameters== +<code c> 
-;Reserved (USHORT) - input : Must be set to zero. +DosPortAccess (ReservedTypeOfAccessFirstPort, LastPort
-;TypeOfAccess (USHORT) - input : A request for or release of access to a port. +</code>
-::0 - Request access +
-::1 - Release access. +
-FirstPort (USHORT- input : Starting (low) number in a contiguous range or a single port. +
-; LastPort (USHORT) - input : Ending (high) number in a contiguous range or a single port. If only one port is being used, FirstPort and LastPort should both be set to this port.+
  
-==Return Code== +===== Parameters ===== 
-;rc (USHORT) - return:Return code descriptions are: + 
-*0 NO_ERROR +  * Reserved ([[USHORT]]) - input : Must be set to zero. 
-*5 ERROR_ACCESS_DENIED+  * TypeOfAccess ([[USHORT]]) - input : A request for or release of access to a port. 
 +    *0 - Request access 
 +    *1 - Release access. 
 +  * FirstPort ([[USHORT]]) - input : Starting (low) number in a contiguous range or a single port. 
 +  * LastPort ([[USHORT]]) - input : Ending (high) number in a contiguous range or a single port. If only one port is being used, FirstPort and LastPort should both be set to this port. 
 + 
 +===== Return Code ===== 
 + 
 +rc ([[USHORT]]) - return:Return code descriptions are: 
 + 
 +  *0 NO_ERROR 
 +  *5 ERROR_ACCESS_DENIED 
 + 
 +===== Remarks =====
  
-==Remarks== 
 Note that CLI/STI privilege is also granted automatically. There is no need to make an additional call to [[DosCLIAccess]]. Note that CLI/STI privilege is also granted automatically. There is no need to make an additional call to [[DosCLIAccess]].
  
Line 26: Line 35:
 An application with no IOPL segments that accesses a device through a device driver or by an interface package such as VIO, does not need to issue this call. The device driver or interface package is responsible for obtaining the necessary I/O access. An application with no IOPL segments that accesses a device through a device driver or by an interface package such as VIO, does not need to issue this call. The device driver or interface package is responsible for obtaining the necessary I/O access.
  
-==Bindings== +===== Bindings ===== 
-===C=== + 
-<PRE>+==== C ===
 + 
 +<code c>
 #define INCL_DOSDEVICES #define INCL_DOSDEVICES
  
Line 39: Line 50:
  
 USHORT  rc;            /* return code */ USHORT  rc;            /* return code */
-</PRE>+</code> 
 + 
 +==== MASM ==== 
  
-===MASM=== +<code asm>
-<PRE>+
 EXTRN  DosPortAccess:FAR EXTRN  DosPortAccess:FAR
 INCL_DOSDEVICES     EQU 1 INCL_DOSDEVICES     EQU 1
Line 53: Line 66:
  
 Returns WORD Returns WORD
-</PRE>+</code>
  
 {{page>en:templates:fapi}} {{page>en:templates:fapi}}