Path: utzoo!attcan!uunet!convex!killer!mit-eddie!rutgers!iuvax!bkliewer From: bkliewer@iuvax.cs.indiana.edu (Bradley Dyck Kliewer) Newsgroups: comp.sys.ibm.pc Subject: Re: Kbd. LED Indicator Lights? Message-ID: <15736@iuvax.cs.indiana.edu> Date: 11 Dec 88 20:36:26 GMT References: <23a131e9@ralf> Reply-To: bkliewer@iuvax.UUCP (Bradley Dyck Kliewer) Organization: Indiana University CSCI, Bloomington Lines: 21 In article <23a131e9@ralf> Ralf.Brown@B.GP.CS.CMU.EDU writes: >They only toggle because the BIOS checks for changed bits each time the >keyboard sends a scan code, and updates the LEDs if necessary. There is a >specific command that you send the keyboard controller at I/O port 64h which >sets the LEDs, but I can't find it off-hand. > >So, if the program changes the status bits, but no keys are pressed, held >down, or released afterwards, the LEDs will not change. Makes for a bit of an >unusual effect to have the NumLock LED change when you press Shift... Not on IBM machines. Toggling the bits in the BIOS data area immediately update the LED's (I just tried it to make sure I remembered correctly). I have always assumed some type of interrupt generates the change, but it's not the keyboard interrupt. Could it be the timer interrupt? As for the command at port 64h, EDh is Set/Reset Mode Indicators. The next byte sets the LED's bit 2=Caps Lock, bit 1=Num Lock, bit 0=Scroll Lock. Bradley Dyck Kliewer Hacking... bkliewer@iuvax.cs.indiana.edu It's not just an adventure It's my job!>