delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/20/09:40:46

From: ovek AT arcticnet DOT no (Ove Kaaven)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Key board LED's
Date: Sat, 19 Apr 1997 23:33:42 GMT
Organization: Vplan Programvare AS
Lines: 30
Message-ID: <5jbcgk$up5$1@troll.powertech.no>
References: <5jap5r$721 AT lion DOT cs DOT latrobe DOT edu DOT au>
NNTP-Posting-Host: alwayscold.darkness.arcticnet.no
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019