inpd

read a double-word from an 80x86 hardware port

Synopsis:

#include <conio.h>
unsigned long inpd( int port );

Description:

The inpd() function reads a double word (four bytes) from the 80x86 hardware port whose number is given by port.

A hardware port is used to communicate with a device. One, two or four bytes can be read and/or written from each port. Consult the technical documentation for your computer to determine the port numbers for a device and the expected usage of each port for a device.

When you use the inpd() function, your program must be linked for privity level 1, and the process must be run by the superuser or a setuid program that's owned by the superuser but started by a regular user. For more information on privity, see

Returns:

the double-word that was read

See also:

inp(), inpw(), outp(), outpd(), outpw()

Examples:

#include <conio.h>
#define DEVICE 34

void main()
  {
    unsigned long transmitted;

    transmitted = inpd( DEVICE );
  }

Classification:

Intel

Systems:

DOS/32, Win386, Win32, QNX/32, OS/2-32, Netware