Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ inb(9F) — SunOS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

outb(9F)

inb(9F)

NAME

inb, inw, inl, repinsb, repinsw, repinsd − read from an I/O port

SYNOPSIS

unsigned char inb(int port);
unsigned short inw(int port);
unsigned long inl(int port);
void repinsb(int port, unsigned char ∗addr, int count);
void repinsw(int port, unsigned short ∗addr, int count);
void repinsd(int port, unsigned long ∗addr, int count);

ARGUMENTS

port A valid I/O port address. 

addr The address of a buffer where the values will be stored. 

count The number of values to be read from the I/O port. 

INTERFACE LEVEL

Solaris for x86 architecture specific (SunDDI). 

DESCRIPTION

These routines read data of various sizes from the x86 I/O port with the address specified by port.

The inb(), inw(), and inl() functions read 8 bits, 16 bits, and 32 bits of data respectively, returning the resulting values. 

The repinsb(), repinsw(), and repinsd() functions read multiple 8-bit, 16-bit, and 32-bit values, respectively.  count specifies the number of values to be read.  addr is a pointer to a buffer that will receive the input data; the buffer must be long enough to hold count values of the requested size. 

RETURN VALUES

inb(), inw(), and inl() return the value that was read from the I/O port. 

CONTEXT

These functions may be called from user or interrupt context. 

SEE ALSO

outb(9F)
 
 
 
 

SunOS 5.1  —  Last change: 22 January 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026