
A utility function, modemLoopback determines
the state of registers and generates an interrupt in the event of
modem loopback being requested (a bit in the modem control
register). It is used by the busRead and
busWrite functions.
Three utility functions are provided to handle
interrupts. setIntrFlags sets the interrupt
indication register according to which interrupts are currently
pending. genIntr generates an interrupt and
clrIntr clears an interrupt. In this
implementation these functions ensure all register flags are set
correctly but do not drive an external interrupt signal.
A set of convenience utilities are provided to set and clear flags
in registers (set and
clear) and to test the state of a flag bit in a
register (isSet and
isClear).
