SECTION 6
Conversions and Interfaces
6-108 PEN*KEY
R
6200/6300 Hand-Held Computer Programmer’s Reference Guide
INT 16h, Function AH = 00h: Read Next ASCII Character
BIOS
If no key is in the buffer, pend until a key is pressed. This function must issue
INT 15h, Function 90h (Device Busy) with AL set to 2 (Keyboard) to inform the
OS that no key is available and that another task may be run. This function
acts as an 83/84Ćstyle keyboard filter, masking duplicates and removing
undefined 101 keys. Control is returned only when a key is available, and the
key is removed from the keyboard buffer. Send a command to the keyboard to
update the LED settings, to ensure that the keyboard LEDs match the current
flag settings.
This could create some PL/N compatibility issues since the scan code returned in
the AH register in the 4000 BIOS is zero when AL is a valid ASCII character.
See Table 6Ć4, starting on page 6Ć105, for returned character codes.
On Entry:
AH = 00h
On Return:
AX = Character code
INT 16h, Function AH = 01h: Return Key Buffer Status
BIOS
If the keyboard buffer does not contain a key, this function returns with the zero
flag is set. This function acts as an 83/84Ćstyle keyboard filter, masking
duplicates and removing undefined 101 keys. A command must be sent to the
keyboard to update the LED settings, to ensure that the keyboard LEDs match
the current flag settings.
On Entry:
AH = 01h
On Return:
Zero = Set flag if the keyboard buffer is empty
AX = Character code
"
NOTE:
This could create some PL/N compatibility issues since the scan code returned in the AH
register in the 4000 BIOS is zero when the AL register has a valid ASCII character. See
Table 6-4, starting on page 6-105, for returned character codes.
INT 16h, Function AH = 02h: Read Shift Status
BIOS
On Entry:
AH = 02h
On Return:
AL = Shift status
Bit 7 = Insert state
Bit 6 = Caps Lock state
Bit 5 = Num Lock state
Bit 4 = Scroll Lock state
Bit 3 = Alt + Shift
Bit 2 = Ctrl + Shift
Bit 1 = Left shift
Bit 0 = Right shift
6. Conversions and
Interfaces