man(1) Manual page archive


     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 provides functions to allow kernel
          code written in C to access the I/O address space.  On sev-
          eral other architectures such as the PowerPC and Strongarm,
          the platform-dependent code provides similar functions to
          access devices with an I/O space interface, even when that
          is 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

     INB(10.2)                     (x86)                     INB(10.2)

     SEE ALSO
          dma(10.2), isaconfig(10.2)