arch man page on Inferno

Man page or keyword search:  
man Server   579 pages
apropos Keyword Search (all sections)
Output format
Inferno logo
[printable version]

ARCH(3)								       ARCH(3)

NAME
       arch - x86 architecture-specific information and control

SYNOPSIS
       bind -a #P /dev

       /dev/cputype
       /dev/ioalloc
       /dev/iob
       /dev/iol
       /dev/iow
       /dev/irqalloc

DESCRIPTION
       This  device  presents textual information about PC hardware and allows
       user-level control of the I/O ports on x86-class machines.

       Reads from cputype recover the processor type and clock rate.

       Reads from ioalloc return I/O ranges used by each device, one line  per
       range.  Each line contains three fields separated by white space: first
       address in hexadecimal, last address, name of device.

       Reads from irqalloc return the enabled interrupts, one line per	inter‐
       rupt.   Each  line  contains three fields separated by white space: the
       trap number, the IRQ it is assigned to, and  the	 name  of  the	device
       using it.

       Reads  and  writes  to iob, iow, and iol cause 8-bit wide, 16-bit wide,
       and 32-bit wide requests to I/O ports.  The port accessed is determined
       by the byte offset of the file descriptor.

EXAMPLE
       The following Limbo code reads from an x86 byte I/O port.

	      inportb(port: int): byte
	      {
		  data := array[1] of byte;

		  if(iobfd == nil)
		      iobfd = sys->open("#P/iob", Sys->ORDWR);

		  sys->seek(iobfd, port, 0);
		  if(sys->read(iobfd, data, len data) != len data)
		      fatal(sys->sprint("inportb(16r%4.4x): %r\n", port));
		  return data[0];
	      }

SOURCE
       /os/pc/devarch.c

				      x86			       ARCH(3)
[top]

List of man pages available for Inferno

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net