Specifications
Sealevel Systems
PIO-32.PCI
Page
9
Relative Addressing vs. Absolute Addressing
The SeaIO API makes a distinction between “absolute” and “relative”
addressing modes. In absolute addressing mode, the Port argument to the API
function acts as a simple byte offset from the base I/O address of the device.
For instance, Port #0 refers to the I/O address base + 0; Port #1 refers to the
I/O address base + 1.
Relative addressing mode, on the other hand, refers to input and output ports in
a logical fashion. With a Port argument of 0 and an API function meant to
output data, the first (0
th
) output port on the device will be utilized. Likewise,
with a Port argument of 0 and an API function designed to input data, the first
(0
th
) input port of the device will be utilized.
In all addressing modes, port numbers are zero-indexed; that is, the first port is
port #0, the second port is #1, the third #2, and so on.
Given Port A, Port D are inputs and Port B, Port C are outputs, the Tables
below he Absolute address, and the relative address. The absolute address will
be the same for any configuration, while the relative address will depend on the
particular configuration.