Browse Prior Art Database

Compatibility Improvements for the IBM Pcjr Keyboard

IP.com Disclosure Number: IPCOM000037002D
Original Publication Date: 1989-Nov-01
Included in the Prior Art Database: 2005-Jan-29
Document File: 3 page(s) / 16K

Publishing Venue

IBM

Related People

Strait, GE: AUTHOR

Abstract

Presented is a software solution to make the keyboard operation of the IBM PCjr more nearly compatible with other models of the IBM Personal Computer family.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 46% of the total text.

Page 1 of 3

Compatibility Improvements for the IBM Pcjr Keyboard

Presented is a software solution to make the keyboard operation of the IBM PCjr more nearly compatible with other models of the IBM Personal Computer family.

The keyboards of all IBM Personal Computers generate interrupts that cause the computer to accept keyboard input. In most models, this interrupt is routed through an Intel 8259A Programmable Interrupt Controller chip. This results in a level 9 interrupt ("INT 9"). In the PCjr, the keyboard is connected directly to the Non-Maskable Interrupt ("NMI") pin of the 8088 microprocessor.

Interrupts connected through the 8259A Programmable Interrupt Controller chip may be disabled by application software by clearing the 8088 interrupt enable flag (instruction CLI). This allows an application to prevent interrupts during times when it is not prepared to handle them. The interrupt enable flag does not disable the NMI. Applications that clear the interrupt enable flag to disable the keyboard will not succeed in disabling the PCjr keyboard. This may cause these application programs to fail. Furthermore, as will be shown, the interrupt enable flag cannot be depended on to disable other hardware interrupts if the user is pressing keys.

The software routine in the PCjr BIOS (Basic Input-Output System) ROM that services the keyboard NMI enables all hardware interrupts (at offset OFF4 in the BIOS ROM * then generates an INT 9 (at offset 11AD, 125E, 1287, or 12E6) in software. This allows any hardware interrupt and the keyboard interrupt (INT 9 is a hardware interrupt connected through the 8259A on most other models) to occur regardless of the state of the 8088 interrupt enable flag at the time the user pressed a key.

This means that hardware interrupts on the PCjr cannot be reliably disabled by clearing the 8088 interrupt enable flag, since any time the user presses a key, any interrupt is allowed regardless of the state of the 8088 interrupt enable flag.

The PCjr may be made to respect the state of the interrupt enable flag for these interrupts during the key interrupt processing by changing the code that services the NMI. The NMI will still occur, but the other interrupts may be prevented. Two separate changes are required, one to prevent the INT 9 and another to prevent the other hardware interrupts.

The 8 hardware interrupts connected through the 8259A will remain disabled if interrupts are not re-enabled as BIOS does at offset OFF4 (instruction STI). Changing this requires replacing the entire BIOS NMI service routine with a substitute routine. This may be done with a program in a PCjr program cartridge, or by a routine loaded in RAM (in the form of a device driver or a TSR (Terminate and Stay Resident) program under DOS.

The INT 9 keyboard interrupt may be prevented if the NMI service routine merely saves the received scan code in a buffer rather than processing it and generating an INT 9. The scan code left buffered must be used to ge...