[Previous]
[Contents]
[Next]

outpd()

write a double-word to an 80x86 hardware port

Synopsis:

#include <conio.h>
unsigned long outpd( int port,
                     unsigned long value );

Description:

The outpd() function writes a double word (four bytes), determined by value, to 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, depending upon the hardware. 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.

Returns:

The value transmitted.

Examples:

#include <conio.h>
#define DEVICE 34

void main()
  {
    outpd( DEVICE, 0x12345678 );
  }

Classification:

Intel

Safety:
Interrupt handler Yes
Signal handler Yes
Thread Yes

Caveats:

When you use the outpd() function, your program must be linked for privity level 1, and the process must be run by the superuser (root) or by a setuid program owned by the superuser. For more information on privity, see

See also:

inp(), inpd(), inpw(), outp(), outpw()


[Previous]
[Contents]
[Next]