Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 26 of 38

PEN*KEY 6100 Computer Programmer's Reference Guide: Section 6: Conversions and Interfaces, pages 227 to 236

Pages 227 to 236 of 328, from PEN*KEY 6100 Computer Programmer's Reference Guide

The original document is the PDF (1.2 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

Filed in the catalog under the Intermec 6110

Page 227

SECTION 6

Conversions and Interfaces

Table 6-6 (Continued) Character Codes Returned by INT 16h, Functions 00h/01h 101 Key No.

U.S. Keyboard Legend

Scan Codes (Hex)

Unshifted (AH/AL)

Shifted (AH/AL)

97 98 99 100

5 2 Down 0 Ins *

4C 50 52 37

4C/00 50/00 52/00 37/2A

4C/35 50/32 52/30 37/2A

101 102 103 104

9 PgUp 6 Right 3 PgDn . Del

49 4D 51 53

49/00 4D/00 51/00 53/00

49/39 4D/36 51/33 53/2E

105 106 108 110

+ Enter (pad) Esc

4A 4E E0ć1C 01

4A/2D 4E/2B 1C/0D 01/1B

4A/2D 4E/2B 1C/0D 01/1B

IC/0A 01/1B

112 113 114 115

F1 F2 F3 F4

3B 3C 3D 3E

3B/00 3C/00 3D/00 3E/00

54/00 55/00 56/00 57/00

5E/00 5F/00 60/00 61/00

68/00 69/00 6A/00 6B/00

116 117 118 119

F5 F6 F7 F8

3F 40 41 42

3F/00 40/00 41/00 42/00

58/00 59/00 5A/00 5B/00

62/00 63/00 64/00 65/00

6C/00 6D/00 6E/00 6F/00

120 121 122 123

F9 F10 F11 F12

43 44 57 58

43/00 44/00

5C/00 5D/00

66/00 67/00

70/00 71/00

125 126

Scroll Lock Pause

46

Alt (AH/AL)

6. Conversions and Interfaces

Control (AH/AL)

84/00 74/00 76/00

PEN*KEY R 6100 Computer Programmer’s Reference Guide

6-91

Page 228

Conversions and Interfaces

SECTION 6

INT 16h, Function AH = 00h: Read Next ASCII Character

6. Conversions and Interfaces

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 undeĆ fined 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 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. On Entry: AH = 00h On Return: AX = Character code INT 16h, Function AH = 01h: Set Zero Flag if Key Buffer Empty BIOS The key is not removed from the buffer. If the keyboard buffer does not contain a key, the zero flag is set. This function acts as an 83/84Ćstyle keyboard filter, masking duplicates and removing undefined 101 keys. 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. On Entry: AH = 01h On Return: Zero = Set flag if the keyboard buffer is empty AX = Character code INT 16h, Function AH = 02h: Read Shift Status BIOS On Entry: AH = 02h On Return: AL = Shift status 7 = Insert state 6 = Caps Lock state 5 = Num Lock state 4 = Scroll Lock state 3 = Alt + Shift 2 = Ctl + Shift 1 = Left shift 0 = Right shift

6-92

PEN*KEY R 6100 Computer Programmer’s Reference Guide

Page 229

SECTION 6

Conversions and Interfaces

INT 16h, Function AX = 0304h: Set Typematic Rates; Turn Off Key Repeat

On Return: None INT 16h, Function AX = 0305h: Set Typematic Rates; Set Key Repeat Timers 4000API The default first repeat delay is 14, or about 0.77 second. The default repeat time is 3, or about 0.17 second On Entry: AH = 03h AL = 05h BH = First repeat delay in system timer ticks BL = Repeat time in system timer ticks On Return: None INT 16h, Function AX = 0306h: Set Typematic Rates; Turn On Key Repeat 4000API On Entry: AH = 03h AL = 06h On Return: None INT 16h, Function AH = 04h: Turn Keyclick Off or On 4000API On Entry: AH = 04h AL = Click state Bit values: 0 Turn key click off 1 Turn key click on On Return: None INT 16h, Function AH = 05h: Put Key into Buffer as if from Keyboard BIOS On Entry: AH = 05h CH = Scan code CL = Character On Return: AL = 0 if successful: 1 if buffer is full PEN*KEY R 6100 Computer Programmer’s Reference Guide

6-93

6. Conversions and Interfaces

4000API On Entry: AH = 03h AL = 04h

Page 230

Conversions and Interfaces

SECTION 6

INT 16h, Function AH = 10h: Read Next Extended ASCII Character

6. Conversions and Interfaces

BIOS If there is no key 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 operating system that no key is available and that another task may be started. This function does not filter character codes for 83/84Ćstyle keyboard compatibility. Control is returned only when a key is available and the key is removed from the keyboard buffer. 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 = 10h On Return: AX = Character code " NOTE:

There could be 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 – such as some of the ALTcharacter combinations. See the chart showing the character codes returned by INT 16h, in the Standard Keyboard Interface topic, on page 6-35.

INT 16h, Function AH = 11h: Set Zero Flag if Extended Key Buffer Empty BIOS The key is not removed from the buffer. If the keyboard buffer does not contain a key, the zero flag is set. This function does not filter character codes for the 83/84Ćstyle keyboards. A command must be sent 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. On Entry: AH = 11h On Return: Zero = Set flag if the keyboard buffer is empty AX = Character code

6-94

PEN*KEY R 6100 Computer Programmer’s Reference Guide

Page 231

SECTION 6

Conversions and Interfaces

INT 16h, Function AH = 12h: Read Extended Shift Status

6. Conversions and Interfaces

BIOS On Entry: AH = 12h On Return: AH = Shift status 7 = Sys Req pressed 6 = Caps Lock state 5 = Num Lock state 4 = Scroll Lock state 3 = Right Ctl state 2 = Left Ctl state 1 = Left Alt state 0 = Right Alt state AL = Shift status 7 = Insert state 6 = Caps Lock state 5 = Num Lock state 4 = Scroll Lock state 3 = Alt + Shift 2 = Ctl + Shift 1 = Left shift 0 = Right shift INT 16h, Function AH = FEh: Swap Keyboard Translate Tables 4000API On Entry: AH = 0FEh ES:BX = Address of new keyboard table as defined in the following table. ES:BX = 0:0 causes the default table to be restored. On Return: None If ES:BX = 0, install the default keyboard table. This is a nonstandard function. Using this function affects the portability of the application to other PCĆcompatible platforms. 40Ćkey translate table: ;unshifted 40 key table db db db db db db db

‘A’, ‘H’, ‘O’, ‘V’, –1, –1, –1,

‘B’, ‘I’, ‘P’, ‘W’, –1, –1, –1,

‘C’, ‘J’, ‘Q’, ‘X’, –1, –1, –1,

‘D’, ‘K’, ‘R’, CLEAR, EXIT, LSHFT, ESCAPE,

‘E’, ‘L’, ‘S’, ‘7’, ‘4’, ‘1’, ‘0’,

‘F’, ‘M’, ‘T’, ‘8’, ‘5’, ‘2’, –1,

‘G’ ‘N’ ‘U’ ‘9’ ‘6’ ‘3’ –1

PEN*KEY R 6100 Computer Programmer’s Reference Guide

6-95

Page 232

Conversions and Interfaces

SECTION 6

;shifted 40 key table

6. Conversions and Interfaces db db db db db db db

TUP, ‘@’, ‘;’, ‘ ’, –1, –1, –1,

TDWN, ‘–’, ‘,’, ‘Y’, –1, –1, –1,

TLEFT, ‘#’, ‘:’, ‘Z’, –1, –1, –1,

TRIGHT, ‘*’, ‘?’, CLEAR, EXIT, LSHFT, ESCAPE,

‘+’, ‘%’, ‘.’, ‘7’, ‘4’, ‘1’, ‘0’,

‘=’, ‘/’, TDEL, ‘8’, ‘5’, ‘2’, –1,

‘$’ ‘&’ LITE ‘9’ ‘6’ ‘3’ –1

25Ćkey translate table: ;unshifted 25 key table db db db db db db

TUP, –1, –1, –1, –1, –1,

TDWN, ‘–’, LSHFT, ‘7’, ‘1’, ESCAPE,

TLEFT, ‘.’, TDEL, ‘8’, ‘2’, ‘,0’,

TRIGHT EXIT CLEAR ‘9’ ‘3’ CR

TLEFT, ‘.’, TDEL, ‘8’, ‘5’, ‘2’, ‘0’,

LITE EXIT CLEAR ‘9’ ‘6’ ‘3’ CR

;shifted 25 key table db db db db db db db

TUP, –1, –1, –1, –1, –1, –1,

TDWN, ‘–’, LSHFT, ‘7’, ‘4’, ‘1’, ESCAPE,

INT 16h, Function AH = FFh: Return Number of Keys on Default Keyboard 4000API On Entry: AH = 0FFh On Return: AL = Number of keys This is a nonstandard function. Using this function affects the portability of the application to other PCĆcompatible platforms.

6-96

PEN*KEY R 6100 Computer Programmer’s Reference Guide

Page 233

SECTION 6

Conversions and Interfaces

Timer and Real-Time Clock Services: Interrupt 1Ah INT 1Ah, Function AH = 00h: Read System Timer Ticks

On Entry: AH = 00h On Return: CX = High word of system timer tick count DX = Low word of system timer tick count AL = Timer overflow flag 0 if day has not rolled over since last read 1 if timer value has exceeded 24 hours INT 1Ah, Function AH = 01h: Set System Timer Ticks BIOS Sets the BIOS data values located at 40:6Ch and 40:6Eh to the data contained in CX and DX, respectively. It thereby sets the system timer tick count. Execution of this function clears the timer overflow flag at location 40:70h. On Entry: AH = 01h CX = High byte of the system timer tick count DX = Low byte of the system timer tick count On Return: None INT 1Ah, Function AH = 02h: Read the Real-Time Clock Time BIOS Reads the hour, minute, second, and Daylight Savings option data from the CMOS RAM area of the MC 146818. Must verify that the updateĆinĆprogress bit is zero and disable interrupts before accessing the CMOS data. On Entry: AH =02h On Return: CH = Hours in BCD (0ć23) CL = Minutes in BCD (0ć59) DH = Seconds in BCD (0ć59) DL = Daylight Savings Time option 0 = No Daylight Savings Time 1 = Daylight Savings Time

PEN*KEY R 6100 Computer Programmer’s Reference Guide

6-97

6. Conversions and Interfaces

BIOS Retrieves the values from the BIOS data areas 40:6Eh (high word) and 40:6Ch (low word). The value returned is the total number of clock ticks since midnight of system timer channel 0. Clock ticks occur 18.2 times per second and are proĆ cessed by INT 08h. Interrupts are disabled while the timer tick is read to preĆ vent update during access to the memory locations. The timer overflow flag, reĆ turned in AL, is reset to zero when this function is executed.

Page 234

Conversions and Interfaces

SECTION 6

INT 1Ah, Function AH = 03h: Set the Real-Time Clock Time

6. Conversions and Interfaces

BIOS Writes the hour, minute, second, and Daylight Savings option data to the CMOS RAM area of the MC 146818. It must wait for the updateĆinĆprogress bit to beĆ come zero and disable interrupts before accessing the CMOS data. Then, it must return with the carry flag set, if there was an error; otherwise, the carry flag must be cleared. On Entry: AH = 03h CH = Hours in BCD (0ć23) CL = Minutes in BCD (0ć59) DH = Seconds in BCD (0ć59) DL = Daylight Savings Time option 0 = No Daylight Savings Time 1 = Daylight Savings Time On Return: None INT 1Ah, Function AH = 04h: Read the Real-Time Clock Date BIOS Reads the century, year, month, and day from the CMOS RAM area of the MC 146818. It must wait for the updateĆinĆprogress bit to become zero and disable interrupts before accessing the CMOS data. Then, it must return with the carry flag set, if there was an error; otherwise, the carry flag must be cleared. On Entry: AH = 04h On Return: CH = Century in BCD (19 or 20) CL = Year in BCD (0ć99) DH = Month in BCD (1ć12) DL = Day in BCD (1ć31) INT 1Ah, Function AH = 05h: Set the Real-Time Clock Date BIOS Writes the century, year, month, and day data to the CMOS data area of the MC 146818. It must wait for the updateĆinĆprogress bit to become zero and disable interrupts before accessing the CMOS data. Then, it must return with the carry flag set, if there was an error; otherwise, the carry flag must be cleared. On Entry: AH = 05h CH = Century in BCD (19 or 20) CL = Year in BCD (0ć99) DH = Month in BCD (1ć12) DL = Day in BCD (1ć31) On Return: None

6-98

PEN*KEY R 6100 Computer Programmer’s Reference Guide

Page 235

SECTION 6

Conversions and Interfaces

INT 1Ah, Function AH = 06h: Set the Real-Time Clock Alarm

INT 1Ah, Function Ah = 07h: Reset the Real-Time Clock Alarm BIOS Clears any pending alarm specified by INT 1Ah, Function 06h by resetting the AIE bit in Register B. On Entry: AH = 07h On Return: None INT 1Ah, Function AH = 09h: Read the Real-Time Clock Alarm BIOS Reads the alarm hour, alarm minute, and alarm second data and the AIE bit in Register B from the CMOS RAM area of the MC 146818. This function must wait for the updateĆinĆprogress bit to become zero and disable interrupts before accessing the CMOS data. The function must return with the carry flag set, if there was an error; otherĆ wise, the carry flag must be cleared. On Entry: AH = 09h On Return: CH = Hours in BCD (0ć23) CL = Minutes in BCD (0ć59) DH = Seconds in BCD (0ć59) DL = Alarm status 0 = Alarm not enabled 1 = Alarm enabled PEN*KEY R 6100 Computer Programmer’s Reference Guide

6-99

6. Conversions and Interfaces

BIOS If the alarm is currently enabled, the function is not performed. This function writes the alarm hour, alarm minute, and alarm second data to the CMOS RAM area of the MC 146818 and sets the AIE bit in Register B. This function must wait for the updateĆinĆprogress bit to become zero and disable interrupts before accessing CMOS data. Once activated, the alarm expires once every 24 hours until deactivated. When the alarm expires, INT 4Ah is issued. If the calling program needs control passed to it, it must place the address of the interrupt handler in the vector for INT 4Ah. The user routine must save and reĆ store all registers and preserve the state of the machine. If the high two bits of the hour are set, an alarm expires every hour. If the high two bits of the minutes are set, the alarm expires every minute. If the high two bits of the seconds are set, the alarm expires every second. The function must return with the carry flag set, if there was an error; otherĆ wise, the carry flag must be cleared. On Entry: AH = 06h CH = Hours in BCD (0ć23) CL = Minutes in BCD (0ć59) DH = Seconds in BCD (0ć59) On Return: None

Page 236

Conversions and Interfaces

SECTION 6

Standard Mouse Interface: INT 33h The following is a list of the common mouse functions and the corresponding acĆ tions. To pass commands to the driver, put the command into register AX and perform an interrupt call to INT 33h. 6. Conversions and Interfaces

INT 33h, Function AX = 0000h: Mouse Reset and Status MOUSE Resets the mouse hardware and software; and returns the status. On Entry: AH = 00h AL = 00h On Return: AX = 1 Successful 0 Failed BX = Number of buttons INT 33h, Function AX = 0001h: Show Cursor MOUSE No action taken. On Entry: AH = 00h AL = 01h On Return: None INT 33h, Function AX = 0002h: Hide Cursor MOUSE No action taken. On Entry: AH = 00h AL = 02h On Return: None INT 33h, Function AX = 0003h: Get Button Status and Mouse Position MOUSE Gets the current button status and reports the position of the mouse cursor. On Entry: AH = 00h AL = 03h On Return: BX = 0 Pen is down 1 Button is down CX = coordinate of mouse cursor DX = coordinate of mouse cursor 6-100

PEN*KEY R 6100 Computer Programmer’s Reference Guide