Mail Archives: djgpp/1997/04/20/09:40:46
boylesgj AT lion DOT cs DOT latrobe DOT edu DOT au (Gregary J Boyles) wrote:
>What is the correct procedure for setting the key board LED's?
>I have looked at the key board handler in ALLEGO however there is little
>or no explanation as to what exactly is being done.
>Which port do you need to write to? I tried writting to 0x60 and 0x64 but
>nothing happened.
The command/data I/O port is 0x60. First you write the command byte to
it (commands have bit 7 set), which is 0xED for setting LEDs. Then you
write the data byte. Remember to check that the keyboard is ready (bit
1 of port 0x64 set) before you transmit each byte, and preferably wait
for ACK (0xFA) after each byte.
>What is the structure of the flag you must send to the key board? Is it
>the same as or similar to the DOS state shift key flag?
The DOS state shift key flag shifted right 4 bits.
bit 0 = scroll, bit 1 = num, bit 2 = caps
>Is it absolutely necessary to wait for acknowledgment from the key board
>after writing to it?
It's recommended, but probably not absolutely necessary if your
keyboard UART is reliable. You should wait for the keyboard-ready
status bit though.
- Raw text -