Tandy 1000
Technical Reference Manual
Formats of Commands to the 8042:
Read Time 02
Set Mouse
08
Motion Interrupt
and
Button Interrupt
Set Timer
20
Interrupt
01
HeaderCommand
Set Time
Data
All
data must be
in
BCD format.
1
st
byte = minutes.
2nd byte
= hurs (24 hour clock).
3rd byte
=
day
of the montth.
4th byte
= month.
None
Returns data packet
"R".
Output
is
2 bytes.
o = disable function.
1 - 255
= net number of
"mickeys"
to be moved before interrupt
is
triggered.
Returns data packet
"M".
o = disable function.
1 - 255
= enable function
Returns data packet
"B".
Outputs 1 byte of data
o = disable function.
1 - 255
= enable function
Returns data packet
"A".
(Timer
is
set to interrupt approximately 40 times per second
if
the data
is
available to send.)
What
is
happening:
The 8042
is
interrupted every time data
is
written to the input port 2FC (or
2FE,
which set the command flag). The 8042 moves the data from the input register
into the input buffer and increments a counter.
It
then returns to the point
in
the mouse data sampling and processing cycle at the point of interruption.
During each cycle, the 8042 checks the command flag
to
see
if
a command
has been received.
If
the command flag
is
set,
the 8042 checks the header
byte to determine which command
is
in
its input buffer.
It
then compares the
counter to the number of bytes
in
that command.
If
any of these tests fails,
the 8042 resets the pointer to the input buffer, clears the counter and the com-
mand flag, and continues with its normal cycle.
If
all
the ttests succeed, the
8042 jumps to the routine that handles that command. Each command has
the requirement
to
reset the buffer pointer, the counter, the command flag and
thEm
return control to the normal process.
95