View Full Version : Late Model IBM PC XTs

Great Hierophant
March 23rd, 2006, 08:44 PM
As you may know, the IBM PC XT came with three different BIOSes. The first motherboard came with an 8KB BIOS virtually identical to the IBM PC's third BIOS. The XT's first motherboard removed the cassette socket and control electronics and added 3 additional ISA slots (one unbuffered) and allowed the the system to address 640KB of RAM on the motherboard with the addition of a chip and a jumper. There should not be any compatibility issues between a third BIOS PC and a first BIOS XT.

But after the AT came out IBM started to experiment with the 8/16 bit architecture of the XT. The second and third BIOSes are 32KB in size, just like the ATs. Obviously the ROM addressing on the XT was tweaked a bit to support this, but this wouldn't affect compatibility. Second, support was added for 720KB floppy drives. Again, hardly necessary to increase the ROM size, especially when there is space available from the extraneous cassette routines. No injury to compatibility there either. Finally, these XTs supported the LED-less 101-Key Keyboards.

While the interface hadn't changed, IBM did have to change how the keys were addressed in the ROM, especially as there were 18 more keys available. There were some programs that had difficulty with the new keyboard. Which ones did and could you fix them by using the 83-key keyboard?

March 24th, 2006, 06:31 AM
No program should have had problems with the extended keyboard.

The 5150 and the first 5160s used the 83 key keyboard, which speaks 'scan code set 1'.

The 5170 had an 84 key keyboard with some small changes. It speaks 'scan code set 2'. Scan code set 2 is quite a bit different than scan code set 1.

The extended keyboard came along with the PS/2 line. It speaks scan code set 3. Scan code set 3 is an extension of set 2.

Now, here is where the fun comes in. Extended keyboards support a superset of functions of scan code set 2, so you can use them on an AT unmodified. Some of the extended keyboards are also intelligent enough to sense when the host machine speaks scan code set 1, and will dumb down to that.

Even if the keyboard can physically talk to the machine, the machine has to understand what is being said. The classic example is when you put an extended keyboard on a first revision IBM PC AT. That machine came with a keyboard that only had 10 function keys, while the extended keyboard came with 12. In that case the keyboard still sends scan codes for F11 and F12, but the BIOS routine doesn't recognize the scan codes and hence does not conver them to anything useful. Your own software can hook the keyboard interrupt handler and fix that, but by default the keys are dead.

So how do all of those nifty multi-media keys on a modern keyboard work? Same way ... they send unique scan codes to the machine. The machine's BIOS doesn't know them so it ignores them. However the OS (Windows usually) can interpret them just fine using software.

Another note: LEDs vs no LEDs. PC and XT class machine BIOSes speak scan code set 1, which does not allow the machine to control the keyboard. (At least not to the extent of turning LEDs on and off in the standard way.) That was one of the improvements in scan code set 2.


Forgot to mention ... On the keyboards that dumb themselves down to speak scan code set 1, it looks like the extra keys have the same scan codes as the existing keys. For example, the machine just sees 'left arrow' and can't tell that it came from the numeric keypad vs. the cursor keypad. A simple BASIC program will show you the scan codes if you want to experiment.