Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ (10.2) — Plan9 3rd Edition (Vita Nuova)

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dma(10.2)

isaconfig(10.2)

INB(10.2)  —  x86

NAME

inb, ins, inl, outb, outs, outl, insb, inss, insl, outsb, outss, outsl − programmed I/O

SYNOPSIS

intinb(int port);

ushortins(int port);

ulonginl(int port);

voidoutb(int port, int value);

voidouts(int port, ushort value);

voidoutl(int port, ulong value);

voidinsb(int port, void ∗address, int count);

voidinss(int port, void ∗address, int count);

voidinsl(int port, void ∗address, int count);

voidoutsb(int port, void ∗address, int count);

voidoutss(int port, void ∗address, int count);

voidoutsl(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 instruction 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

SEE ALSO

dma(10.2), isaconfig(10.2)

Plan 9  —  April 13, 2000

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