INB(10.2) (x86) INB(10.2)
NAME
inb, ins, inl, outb, outs, outl, insb, inss, insl, outsb,
outss, outsl - programmed I/O
SYNOPSIS
int inb(int port);
ushort ins(int port);
ulong inl(int port);
void outb(int port, int value);
void outs(int port, ushort value);
void outl(int port, ulong value);
void insb(int port, void *address, int count);
void inss(int port, void *address, int count);
void insl(int port, void *address, int count);
void outsb(int port, void *address, int count);
void outss(int port, void *address, int count);
void outsl(int port, void *address, int count);
DESCRIPTION
The x86 implementation of Inferno provides functions to
allow kernel code written in C to access the I/O address
space. On several other architectures such as the PowerPC
and Strongarm, Inferno provides similar functions to access
devices with an I/O space interface, even though memory
mapped, to encourage portability of device drivers.
Inb, ins and inl apply the corresponding hardware instruc-
tion to fetch the next byte, short or long from the I/O
port. Outb, outs and outl output a value to the I/O port.
The remaining functions transfer count bytes, shorts, or
longs using programmed I/O between a memory address and
port. Functions insx copy values into memory; functions
outsx copy values from memory. The count is in elements,
not bytes.
SOURCE
/os/pc/l.s
Page 1 Plan 9 (printed 1/1/26)
INB(10.2) (x86) INB(10.2)
SEE ALSO
dma(10.2), isaconfig(10.2)
Page 2 Plan 9 (printed 1/1/26)