Tandy 1000
Technical Reference Manual
In
the
Read
Time command, the 8042 sets up bit serial communications with
the clock/calendar chip and builds 4 time data packets.
The
4 packets are
converted
to
bytes and placed
in
the output buffer behind the
"R"
header
byte.
The
8042
sets
up a
Read
Time data packet to
be
sent to the 8088 and
returns to normal operation.
If
the power fails, bit data
is
set
in
the status register (Port
2FE
Bit
7).
First,
check
to
see
if
the power failure
is
temporary. (Perhaps the battery lost con-
tact with the clock circuit because
of
a bump or jarring of the equipment.)
To
check for temporary failure, issue a
Set
Time command.
If
the power failure
bit
is
set
to
zero everything
is
normal.
If
the power fialure bit
is
not
reset,
then
the battery either
is
dead or
is
dislodged from
its
holder clip. After replacing
or resetting the battery, issue the
Set
Time command
to
ensure proper
operation.
Operation of the 8042:
Upon power up/RESET, the 8042 initializes the system by zeroing
all
RAM
and
clearing
all
flags, ports, and registers.
It
then sets up the default conditions
and enters the normal mouse data procesing cycle, which follows:
1.
The 8042 takes a copy
of
the Mouse/Clock/Calendar data port
(P1)
and
saves copy.
2.
It
then checks
to
see
if
there
is
any change
in
the status
of
the buttons.
If
there
is,
the 8042 sends a copy to the status register.
3.
Next, the 8042 determines the Delta x changes
or
Delta y changes. Both
Deltas
use
the same process.
4.
The 8042 retrieves the copy of Port
P1
and compares the bit pattern of
xA and
xB
to the old copy to see
if
any changes have occured.
If
a change
has occured then, the 8042 determines whether the change
is
+
1,
-1,
or
null. (Null occurs when the 8042 misses 2 state changes of
xA
and xB.)
5.
The Delta x (or
y)
working accumulator ±32735 units)
is
then either
in-
cremented or decremented respectively. A
null
result does not affect the
accumulators.
6.
At
this point, the 8042 checks the event-triggered data polls for motion and
button data.
If
either occurred, then the 8042 transfers the values
in
the
working accumulators to the output buffer behind the appropriate header
byte and clears the working accumulators to zero.
If
not, then the 8042
checks to
see.if any input from the 8088 has been received by checking
the
F1
command flag.
If
there
is
input
in
the input buffer, the 8042 tests
the header to
see
which bit
is
"on"
and jumps to the routine that handles
that command.
7.
After checking for input, the 8042 then checks the internal timer to
see
if
anything has timed
out.
Two items are connected to the timer flag, the 8042
and the timed data transfer interrupt.
All
outputs to the 8088 are tied
to
the
timer.
Each
time the timer times out, the 8042 checks the output register
full
flag
to
see
if
it
is
set.
98