DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SCO OpenServer

ind(D3oddi)


ind, outd -- read or write a 32-bit word to a physical I/O address

Synopsis

int ind(int read_addr);

void outd(int write_addr, int value);

Description

The ind( ) function reads a 32-bit word from the specified physical I/O address.

The outd( ) function writes a 32-bit word to the specified physical I/O address.

Arguments


read_addr
integer that specifies the physical I/O address from which to read.

write_addr
integer that specifies the physical I/O address to which to write.

value
32-bit word to be written.

Return values

ind returns the 32-bit value read from the I/O address read_addr.

outd returns no value.

Usage

Context and synchronization

All contexts.

Hardware applicability

All Intel IA-32 compatible platforms

Version applicability

oddi: 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp

SVR5 DDI compatibility

The inl(D3) and outl(D3) 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.

References

inb(D3oddi), inw(D3oddi), repinsb(D3oddi)

Examples

To read a 32-bit value from I/O address 0x300 you would use the following code:
   int val;
   val = ind(0x300);
To write the 32-bit value 0xFFFF00 to I/O address 0x300 you would use the following code:
   outd(0x300, 0xFFFF00);

19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005