Information Technology Reference
In-Depth Information
PARE
Parity bit - 1 = last byte has a parity error, 0 = no error.
TIM
General time-out - 1 = error, 0 = no error.
AUXB
Output buffer for auxiliary device - 1 = holds data for auxiliary device,
0 = holds keyboard data.
KEYL
Keyboard lock status - 1 = keyboard unlocked, 0 = keyboard locked.
C/D
Command/data - 1 command byte written via port 64h, data byte writ-
ten via port 60h.
SYSF.
System flag - 1 = self-test successful, 0 = power-on reset.
INPB.
Input buffer status - 0 = Data in input buffer, 0 = no data.
OUTB.
Output buffer status - 0 = Controller data in output buffer, 0 = buffer
empty.
The auxiliary device is typically a PS/2 style mouse. Program 10.2 shows an example pro-
gram which reads from the keyboard buffer. It disables the IRQ1 interrupt. (Note that this
may cause some systems to not respond to the keyboard if the program does not terminate
properly.)
Address: 64h
Status register
PARE
TIM
AUXB
KEYL
C/D
SYSF
INPB
OUTB
Figure 10.7
Status register bits
Table 10.2
Control register commands
Code
Command
Return value (in output buffer)
a7h
Disable auxiliary device
a8h
Enable auxiliary device
a9h
Check interface to auxiliary device
00h = no error, 01h = clock line low, 02h = clock
line high, 03h = data line low, 04h = data line
high and ffh = no auxiliary device.
aah
Self-test
55h, on success
abh
Check keyboard interface
00h = no error, 01h = clock line low, 02h = clock
line high, 03h = data line low, 04h = data line
high and ffh = no auxiliary device
adh
Disable keyboard
aeh
Enable keyboard
c0h
Read input port
c1h
Read input port (low)
c2h
Read input port (high)
d0h
Read output port
d1h
Write output port
d2h
Write keyboard output buffer
d3h
Write output buffer of auxiliary device
d4h
Write auxiliary device
e0h
Read test input port
Search WWH ::




Custom Search