inp, inpw

Gamma: Version 4.0
Prev |  | Next

# `inp`, `inpw`

`inp`, `inpw` -- query hardware ports.

## Syntax

    inp (port)
    inpw (port)

## Arguments

`port`

  A hardware port address.

## Returns

The byte (`inp`) or word (`inpw`) located at the hardware port address.

## Description

These functions query a hardware port. In order for these functions to succeed, the interpreter must be running with root permissions and a privity of 1, otherwise these functions may cause a segmentation fault.

The `inp` function reads a single byte from the specified port location. The `inpw` function reads a word (two bytes) from the specified port location.

## Example

Examples of this function are beyond the scope of this documentation.

## See Also

`outp`, `outpw`

Prev | Home | Next
`dev_setup` | Up | `mmap`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.