DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

inb(D3)


inb -- read a byte from an 8 bit I/O port

Synopsis

   #include <sys/types.h>
   #include <sys/ddi.h>
   

uchar_t inb(int port);

Description

The inb( ) function provides a C language interface to the machine instruction that reads a byte from an 8 bit I/O port, using the I/O address space instead of the memory address space.

Arguments


port
A valid 8 bit I/O port.

Return values

Returns the value of the byte read from the I/O port.

Usage

Context and synchronization

This function should be used instead of the inline.h or inline assembler version by the same name. All contexts.

Hardware applicability

Intel IA-32 compatible platforms

Version applicability

ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp

SCO OpenServer ODDI compatibility

inb(D3oddi) is essentially the same function for SCO OpenServer ODDI drivers, although note that the SCO OpenServer function is cast as an int rather than uchar_t.

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, but this information is generally appropriate for SVR5 systems as well.

References

inl(D3), inw(D3), outb(D3), outl(D3), outw(D3), repinsb(D3), repinsd(D3), repinsw(D3), repoutsb(D3), repoutsd(D3), repoutsw(D3)

``Programmed I/O (PIO)'' in HDK Technical Reference,
``Porting DOS inb and outb functionality'' in HDK Technical Reference


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005