bioskey()                Keyboard Interface
 
 #include   <bios.h>
 
 int        bioskey(cmd);
 int        cmd;                         Operation to perform
 
    bioskey() uses BIOS interrupt 0x14 to perform various keyboard
    operations.  'cmd' determines which operation is to be performed:
 
           0    Returns the next key struck at the keyboard. If the lower
                8 bits are non-zero, an ASCII character is returned.  If
                the lower 8 bits are 0, the upper 8 bits represent the
                extended keyboard codes.
 
           1    Tests whether a keystroke is waiting to be read.  A
                return value of 0 indicates no key is available.
                Otherwise, the value of the next keystroke is returned.
                The keystroke itself is kept to be returned by the next
                call to bioskey() with a 'cmd' value of 0.
 
           2    Requests the current shift key status.  The value is
                composed from ORing the following values together:
 
                0x80     'Insert' toggled
                0x40     'Caps' toggled
                0x20     'Num Lock' toggled
                0x10     'Scroll Lock' toggled
                0x08     'Alt' down
                0x04     'Ctrl' down
                0x02     'Left Shift' down
                0x01     'Right Shift' down
 
    Returns:    The return value is based on the value of 'cmd'.   See
                the 'cmd' values and what is returned above.

This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster