Page 1 of 1

KBD LEDs

Posted: Fri Dec 19, 2003 12:00 am
by The_Pro
i know you would have answered such a question alot. whenever i try to set the kbd leds, it fails. it doesn't give any error msg in BOCHS and it doesn't work in real hardware.

WaitForKBD();
outb(0x60, 0xED);
outb(0x60, 0x07);  // To set all LEDs ON



void WaitForKBD()
{
   UCHAR bfr;
   do
   {
     bfr = inb(0x64);
   }while((bfr & 1) != 0);
}

RE:KBD LEDs

Posted: Sat Dec 20, 2003 12:00 am
by gaf
Hi
I think should call WaitForKBD before every outport

WaitForKBD();
outb(0x60, 0xED);
WaitForKBD();
outb(0x60, 0x07);

regards,
gaf