outpw
raw OCR
Outputs a word to a hardware port.
Defined in header <conio.h>
Syntax
#include <conio.h>
unsigned outpw(unsigned portid, unsigned value);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ |
Remarks
outpw is a macro that writes the 16-bit word given by value to the output port specified by portid. It writes the low byte of value to portid, and the high byte of the word to portid +1, using a single 16-bit OUT instruction.
If outpw is called when conio.h has been included, it will be treated as a macro that expands to inline code. If you don't include conio.h, or if you do include conio.h and #undef the macro outpw, you'll get the outpw function.
Return value
outpw returns value.
See also
Example
#include <stdio.h>
iinclude <conio.h>
int main(void)
{
unsigned value, port = 0;
value = outpw(port, 64);
printfi"Value %d sent to port number %d\n", value, port);
return 0;
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Stable link: /3.1/conio.h/outpw/
· short form /3.1/outpw/