inw, outw --
read or write a 16-bit word from or to a physical I/O address
int inw(int read_addr);
void outw(int write_addr, int value);
function reads a 16-bit word
from the specified physical I/O address.
function writes a 16-bit word to
the specified physical I/O address.
Physical I/O address of the 16-bit word
to be read.
Physical I/O address to which to write
the 16-bit word.
16-bit word to be written.
returns a 32-bit integer
whose two most significant bytes are set to zero.
does not return a value.
Context and synchronization
All Intel IA-32 compatible platforms
1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp
SVR5 DDI compatibility
functions are essentially the same functions
for SVR5 DDI drivers,
although note that the casting of the function
and arguments is different.
DOS systems often issue this function from user-level code.
``Porting DOS inb and outb functionality'' in HDK Technical Reference
provides information about how to port such code
to SCO OpenServer systems.
``ODDI driver interface version for SCO OpenServer 5'' in HDK Technical Reference
To read a 16-bit register at I/O address 0x300, you would
use the following lines of code:
short int val;
val = (short int) inw(0x300);
To write the 16-bit value 0xFFF0 to I/O address
0x300, you could use the following code:
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005