# I/O ports

This module exposes the "IN" and "OUT" i386 operations.

p@ ( port -- n )  32-bit read of "port".
pw@ ( port -- n ) 16-bit read of "port".
pc@ ( port -- n ) 8-bit read of "port".
p! ( n port -- )  32-bit write to "port".
pw! ( n port -- ) 16-bit write to "port".
pc! ( n port -- ) 8-bit write to "port".

## p@{} and p!{} moustache actions

This unit also defines moustache [doc/lib/bm] actions for reading and writing
to IO ports. These actions are compile-only.

For example, the compiled equivalent to "42 pc@" would be "p@{'42 &c}" and the
equivalent to "42 cellwithportinit p!" would be "p!{'cellwithportinit #42}".

## ioport{} Custom value

This unit also provides the "ioport{}" custom value, which of course bind the
"getters" to p@ the setters to p!. Example usage:

  ioport{'42 w} foo
  54 to foo \ 16-bit write of value 54 to port 42

