Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     IND(K)                    UNIX System V                    IND(K)



     Name
          ind, outd - reads, writes a 32-bit word to a physical I/O
          address

     Syntax
          int
          ind(read_addr)
          int read_addr;

          int
          outd (write_addr, value)
          int write_addr, value;

     Description
          The ind function reads a 32-bit word from the physical I/O
          address specified by read_addr.

          outd writes a 32-bit value to the physical I/O address
          specified by write_addr.

     Warning
          If the specified read or write address is above 0x1000, call
          flushtlb(K) before calling ind or outd.  Refer to the
          flushtlb manual page for more information.

     Parameters
          The value of read_addr is an integer that specifies the
          physical I/O address to be read from.

          write_addr is the physical I/O address being written to.
          value is the 32-bit word being written to write_addr.

     Return
          ind returns the 32-bit value read from the I/O address
          read_addr.  outd has no return value.

     Example
          To read a 32-bit value from I/O address 0x300 you could use
          the following code:

          int val;
          val = ind(0x300);

          To write the 32-bit value 0xFFFF00 to I/O address 0x300 you

          could use the following code:

          outd(0x300, 0xFFFF00);

     See Also
          flushtlb(K), inb(K), inw(K), repinsb(K), copyin(K)

                                                      (printed 7/19/89)



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