Tandy 1000
Technical Reference Manual
On
the 8088 side, the
"mouse"
interrupt
has
a priority behind the 8253 timer,
keyboard, and hard disk.
This
means that when the interrupt enters its routine,
the higher-level interrupts are enabled.
The
interrupt handler routine should
do
all
the following:
• Ensure that the 8042
is
generating the interrupt by placing a data byte
in
its
output register.
• Identify the type of data packet by
its
"header"
byte and switch
to
the
appropriate routine when the entire data packet
is
received.
• After the data packet
is
processed, clear or reset the buffer pointers,
counters and the latched interrupt.
Format of Data Packets from the 8042:
Data Packet Header Data
"A"
"M"
4 bytes of data
1
st
byte =
MSB
of Delta x
2nd byte
=
LSB
of Delta x
3rd byte
= MSB of Delta y
4th
byte =
LSB
of Delta y
(The button data
is
found
in
the status register (Port 2FE.)
Mouse data
All
data
Motion data only
Mouse data
Button data only
Read
time data
"B"
"R"
none
data found
in
status register (Port
2FE
bits #
4,
5,
6)
4 bytes of data
in
BCD format
1
st
byte = minutes
2nd byte
= hours (24-hour clock)
3rd byte
= day of month
4th byte
= month
Initialization Procedures of 8088:
The
following hardware and software interrupts should
be
initialized:
Description Address Type
Hardware interrupt vector (INT
OB)
002C Doubleword Pointer
Application interrupt vector (INT
33)
OOCC
Doubleword Pointer
Hardware interrupt controller
(IR3)
Port
21
(reset
Bit
3)
Video display interrupt (INT
10)
0040 Doubleword Pointer
Operation of the Clock/Calendar:
When the 8042 receives either the
Set
Time or Read Time command,
it
shuts
off
all
other operations until
it
is
finished with the command.
All
the resources
of the 8042 are required to communicate with the clock/calendar chip.
In
the
Set
Time command, the 8042 breaks up the 4 bytes of time data into
4 packets and sends them serially a bit
at
a time. Upon completion, the 8042
resumes normal operation.
97