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 21 of 28

PEN*KEY 6400 Computer Programmer's Reference Guide: Section 5: BIOS Interrupt Support, pages 171 to 180

Pages 171 to 180 of 234, from PEN*KEY 6400 Computer Programmer's Reference Guide

The original document is the PDF (1.4 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.

For the Intermec 6400

Page 171

BIOS Interrupt Support

SECTION 5

INT 16h, Keyboard BIOS Services Access to the keyboard BIOS services is through Interrupt 16h. The AH register is loaded with the function number to be performed. Other registers are loaded as required by the individual functions. Values are returned in individual registers as defined by the functions. INT 16h, Function AH = 00h: Read Next ASCII Character from Keyboard

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. On Entry: AH = 00h

On Return:

AL = ASCII character (zero if non-ASCII) AH = IBM-compatible scan code (zero if ASCII)

Refer to a standard ASCII character code table for INT 16h, for more information on returned character codes. INT 16h, Function AH = 01h: Get Keyboard Status

BIOS Gets the keyboard status. 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 (with a requirement) style keyboard filter, masking duplicates and removing undefined 101 keys. A command should be sent to the keyboard to update the LED settings, to ensure that the keyboard LEDs match the current flag settings. " NOTE:

For the 6400, this function applies to the annunciators, not LEDs.

On Entry:

AH = 01h

On Return:

If key is available: AH = IBM-compatible scan code (zero if ASCII) AL = ASCII character (zero if non-ASCII) If keyboard buffer is empty: Zero flag = 1

Refer to a standard ASCII character code table for INT 16h, for more information on returned character codes.

PEN*KEYR 6400 Programmer’s Reference Guide

5-61

Page 172

SECTION 5

BIOS Interrupt Support

INT 16h, Function AH = 02h;Get Shift Status

BIOS Returns the shift status. On Entry: AH = 02h

On Return:

AL = Shift status Bit

Shift Status Definition

7 6 5 4 3 2 1 0

Insert state Caps Lock state Num Lock state Scroll Lock state Alt + Shift Ctl + Shift Left Shift Right Shift

INT 16h, Function AH = 04h: Turn Off Key Click AL = 00h; Buzzer Control;

BIOS Turns off the Key Click. On Entry: AH = 04h AL = 00h

(Turn key click off)

On Return: None

INT 16h, Function AH = 04h: Turn On Key Click AL = 01h; Buzzer Control;

BIOS Turns off the Key Click. On Entry: AH = 04h AL = 01h

(Turn key click on)

On Return: None

5-62

PEN*KEYR 6400 Programmer’s Reference Guide

Page 173

BIOS Interrupt Support

SECTION 5

INT 16h, Function AH = 04h: Set Key Click Parameters AL = 02h; Buzzer Control

BIOS Sets the Key Click parameters. On Entry:

AH = 04h AL = 02h (Set parameters) BL = Volume (Not implemented) CX = Duration in milliseconds DX = Frequency in Hz

On Return: None

INT 16h, Function AH = 04h: Get Key Click Parameters AL = 03h; Buzzer Control

BIOS Gets the Key Click parameters. On Entry: AH = 04h AL = 03h

(Get parameters)

On Return:

AL = State 0 = Off 1 = On BL = Volume (Not implemented) CX = Duration in milliseconds DX = Frequency in Hz

INT 16h, Function AH = 04h: Set Error Beep Parameters AL = 04h; Buzzer Control

BIOS Sets the Error Beep parameters. On Entry:

AH = 04h AL = 04h (Set parameters) BL = Volume (Not implemented) CX = Duration in milliseconds DX = Frequency in Hz

On Return: None

PEN*KEYR 6400 Programmer’s Reference Guide

5-63

Page 174

SECTION 5

BIOS Interrupt Support

INT 16h, Function AH = 04h: Get Error Beep Parameters AL = 05h; Buzzer Control

BIOS Gets the Error Beep parameters. On Entry: AH = 04h AL = 05h

(Get parameters)

On Return:

AL = State 0 = Off 1 = On BL = Volume (not implemented) CX = Duration in milliseconds DX = Frequency in Hz

INT 16h, Function AH = 04h: Sound Key Click AL = 06h; Buzzer Control

BIOS Sounds the key click. On Entry:

AH = 04h AL = 06h (Make the sound)

On Return: None

INT 16h, Function AH = 04h: Sound Error Beep AL = 07h; Buzzer Control

BIOS Sounds the error beep. On Entry:

AH = 04h AL = 07h (Make the sound)

On Return: None

INT 16h, Function AH = 04h: Select Buzzer AL = 08h; Buzzer Control

BIOS Selects the specified buzzer. On Entry:

AH = 04h AL = 08h (Make the selection) BL = Buzzer selection bit 0: Internal buzzer bit 1: External (RS-232) buzzer (Not implemented)

On Return: None

5-64

PEN*KEYR 6400 Programmer’s Reference Guide

Page 175

BIOS Interrupt Support

SECTION 5

INT 16h, Function AH = 04h: Beep the Buzzer AL = 09h; Buzzer Control

BIOS Beep the buzzer, as per the specified parameters. On Entry: AH = 04h AL = 09h (Sound the beep) BL = Volume (Not implemented) CX = Duration in milliseconds DX = Frequency in Hertz

On Return: None

PEN*KEYR 6400 Programmer’s Reference Guide

5-65

Page 176

SECTION 5

BIOS Interrupt Support

INT 1Ah, Timer and Real-Time Clock Services Unsupported functions return with the carry flag set. The carry flag is also set if the real-time clock (RTC) is not operational. Individual functions are selected by the content of the AH register when INT 1Ah is invoked. INT 1Ah, Function AH = 00h: Read System Timer Ticks

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 (1800B0h clock ticks per 24 hours) and are processed by INT 08h. Interrupts are disabled while the timer tick is read to prevent update during access to the memory locations. The timer overflow flag, returned in register AL, resets to zero when this function is executed. 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 midnight has not passed since last read) 1 (If midnight has passed since last read)

" NOTE:

Since the timer overflow flag is cleared, in the event an application calls this function after midnight, before DOS does, DOS does not recognize that another day has passed and does not advance the DOS date. See Also: Functions AH=01h, AH=02h INT 1Ah, Function AH = 01h: Write System Timer Ticks

BIOS Sets the BIOS data values located at 40:6Ch and 40:6Eh to the data contained in registers CX and DX, respectively. It thereby sets the system timer tick count. Executing 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

See Also: Functions AH=03h

5-66

PEN*KEYR 6400 Programmer’s Reference Guide

Page 177

BIOS Interrupt Support

SECTION 5

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. This function verifies that the update-in-progress bit is zero and disable interrupts before accessing the CMOS data. On Entry: AH = 02h DS = Internal registers

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 = off (Standard Time) 1 = on Carry = Status Flag 0 (success) 1 (failure)

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

BIOS Writes the hour, minute, second, and Daylight Savings option data to the CMOS RAM area of the MC 146818. This function waits for the update-in-progress bit to become zero and disable interrupts before accessing the CMOS data. 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 = off (Standard Time) 1 = on (Daylight Savings Time)

On Return:

Carry = Status Flag 0 (success) 1 (failure)

See Also: Functions AH=01h, AH=02h, AH=05h

PEN*KEYR 6400 Programmer’s Reference Guide

5-67

Page 178

SECTION 5

BIOS Interrupt Support

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. This function waits for the update-in-progress bit to become zero and disable interrupts before accessing the CMOS data. On Entry: AH = 04h DS = Internal registers

On Return:

If successful: Carry = 0 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) If NOT successful: Carry = 1

See Also: Functions AH=02h, AH=05h 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. This function waits for the update-in-progress bit to become zero and disable interrupts before accessing the CMOS data. 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: Carry = Status Flag 0 (success) (Clock is operating) 1 (failure) See Also: Function AH=04h

5-68

PEN*KEYR 6400 Programmer’s Reference Guide

Page 179

BIOS Interrupt Support

SECTION 5

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

BIOS If the alarm is currently enabled, this 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 waits for the update-in-progress bit to become zero and disable interrupts before accessing the 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 restore 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. On Entry: AH = 06h CH = Hours in BCD (0–23) CL = Minutes in BCD (0–59) DH = Seconds in BCD (0–59) DS = Internal registers

On Return:

Carry = Status Flag 0 (success) (Clock is operating) 1 (failure)

See Also: Function AH=07h 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 DS = Internal registers

On Return: None

See Also: Function AH=06h

PEN*KEYR 6400 Programmer’s Reference Guide

5-69

Page 180

SECTION 5

BIOS Interrupt Support

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 waits for the update-in-progress bit to become zero and disable interrupts before accessing the CMOS data. On Entry: AH = 09h DS = Internal registers

On Return:

CH = Hours in BCD (0–23) CL = Minutes in BCD (0–59) DH = Seconds in BCD (0–59) DL = Alarm status 00h = Alarm not enabled 01h = Alarm enabled, but does not power-on system (not used) 02h = Alarm enabled, and does power-on system Carry = Status Flag 0 (success) or 1 (failure)

See Also: Function AH=08h INT 1Ah, Function AH = FFh: Load the Real-Time Clock to Internal Clock

BIOS On Entry:

AH = 0FFh

On Return:

Carry = 0 (success) 1 (failure)

5-70

PEN*KEYR 6400 Programmer’s Reference Guide