outp, outpw, _outp, _outpw, _outpd

Outputs, at a port, a byte (outp, _outp), a word (outpw, _outpw), or a double word (_outpd).


These functions are obsolete. Beginning in Visual Studio 2015, they are not available in the CRT.
This API cannot be used in applications that execute in the Windows Runtime. For more information, see CRT functions not supported in Universal Windows Platform apps.


int _outp(
   unsigned short port,
   int databyte
unsigned short _outpw(
   unsigned short port,
   unsigned short dataword
unsigned long _outpd(
   unsigned short port,
   unsigned long dataword


Port number.

databyte, dataword
Output values.

Return Value

The functions return the data output. There is no error return.


The _outp, _outpw, and _outpd functions write a byte, a word, and a double word, respectively, to the specified output port. The port argument can be any unsigned integer in the range 0 - 65,535; databyte can be any integer in the range 0 - 255; and dataword can be any value in the range of an integer, an unsigned short integer, and an unsigned long integer, respectively.

Because these functions write directly to an I/O port, they cannot be used in user code. For information about using I/O ports in these operating systems, search for "Serial Communications in Win32" at MSDN.

The outp and outpw names are older, deprecated names for the _outp and _outpw functions. For more information, see POSIX function names.


Routine Required header
_outp <conio.h>
_outpw <conio.h>
_outpd <conio.h>

For more compatibility information, see Compatibility.


All versions of the C run-time libraries.

See also

Console and Port I/O
inp, inpw, _inp, _inpw, _inpd