[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
    Search the FAQ Archives

Part1 - Part2 - Part3 - Part4 - Part5 - Single Page

Top Document: comp.os.msdos.programmer FAQ part 2/5
Previous Document: - What is the SysRq key for?
Next Document: - How can I tell if input, output, or stderr has been redirected?


- How can my program tell what kind of keyboard is on the system?


Date: 5 Feb 2002 22:03:03 -0400

 Ralf Brown's Interrupt List <Q:02.03> [What and where is Ralf Brown's
 interrupt list?] includes MEMORY.LST, a detailed breakdown by Robin
 Walker of the contents of the BIOS system block that starts at
 0040:0000. Bit 4 of byte 0040:0096 is "1=enhanced keyboard installed".
 Here is a C code example to test the keyboard type:

   char far *kbd_stat_byte3 = (char far *)0x00400096UL;
   if (0x10 & *kbd_stat_byte3)
   {
     /* 101- or 102- keyboard is installed */
   }
   else
   {
     /* Not installed */
   }

 PC Magazine 15 Jan 1991 (x: 1) suggests on page 412 that "for some
 clones [the above test] is not foolproof". If you use this method in
 your program you should provide the user some way to override this test,
 or at least some way to tell your program to assume a non-enhanced
 keyboard. The article suggests a different approach to determining the
 type of keyboard.



Top Document: comp.os.msdos.programmer FAQ part 2/5
Previous Document: - What is the SysRq key for?
Next Document: - How can I tell if input, output, or stderr has been redirected?

Part1 - Part2 - Part3 - Part4 - Part5 - Single Page


[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
jeffrey@carlyle.org (Jeffrey Carlyle)

Last Update October 22 2009 @ 05:28 AM

Some parts © 2009 Advameg, Inc.