[inforoots] 3 Key PC Reset Sequesnces
davebradley at nc.rr.com
davebradley at nc.rr.com
Sun Apr 27 08:39:12 PDT 2008
I am here -- Dave Bradley -- who was added to this list by Bill after a very nice lunch this week. Peter -- nice to hear from you again after all this time. I really enjoy retirement.
This is my recollection of how C-A-D came about. Since it's based on memory rather than detailed, contemporaneous notes, it's probably wrong in some details. I have also attempted to include some pictures that are part of the story.
Dr. Dave
--------------------------------------------------------------------
Sometime in the IBM PC BIOS development, probably January 1981, we had a development problem. Lots of new software is arriving and being tested, and, as frequently happens with new software, it would quit running, and nothing would revive it. When you're programming in assembly language, there are lots of opportunities to have something like this happen. Unless you were working on a system board outside the case, the only way to restart the machine was to turn off the power, wait a few seconds for the capacitors to discharge, then power the system back up. You then had to wait for the Power On Self Test to execute which could take up to a minute if you had a lot of memory installed in the machine, DOS to boot (from the diskette, of course), and you could then restart the program under test and try to figure out what went wrong.
The simple solution would have been a reset button. But the mechanical construction of the PC insides would have made it difficult to place one, and then there's always the problem of hitting it inadvertently. So let's use the keyboard. Pick a set of keys that would be difficult to hit by accident. Since the BIOS had to fit in 8KB and was then closer to 9KB, it has to be a very short instruction sequence to detect them. So two of the keys should be shift state keys, since the KB BIOS was already tracking them and recording the shift state info in RAM. So I picked the two newest and least frequently used shift keys, Ctl and Alt. Finally, pick an action key as far removed from them as possible. If you look at the 83-key keyboard of the original PC (significantly different than today's keyboards), you'll see that the single instances of Ctl and Alt are on the left side of the keyboard, and the single instance of Del is on the far right. Short of sitting on the keyboard, it's difficult to hit those three keys by accident. I could have chosen Enter rather than Del, but (a) Enter was a bigger key, more likely to hit by accident, and (b) Del is a better mnemonic than Enter for the drastic action that's about to occur.
The code to handle the C-A-D keystroke was 9 instructions, 30 bytes long. After detecting the two shift states and the Del key, it stores a flag in a special memory location, then jumps to the reset location of the 8088. The POST code detected the special flag (0x1234 in the BIOS RAM area) after doing the system initialization, but before doing the long memory test. I assumed that the memory had been tested when the machine was first powered on, and another memory test was probably unnecessary now. Plus it was a lot faster this way.
This wasn't the first time I had used a three key sequence for a system function. The System/23 DataMaster, which used an Intel 8085 microprocessor, was a prototype for the IBM PC in many ways. I had written a small debugger for use in our S/23 development (think of DEBUG on the original DOS diskette). A developer gained access to that debugger with a a three key sequence similar to C-A-D (although not identical because the keyboard was the same, but the interface and keycaps were not). So using a three key sequence for reset/reboot on the IBM PC was a natural choice.
In my recollection, we originally intended for C-A-D to be a development tool (akin to the debugger of S/23) and not one for customer use. But if you recall the user environment of the diskette-only IBM PC (if anyone reading this was the purchaser of a non-diskette IBM PC, and used your cassette tape player for data storage, I'm sure you repented of that sin quickly), each application program came on its own diskette. The "install" process usually required you to transfer the DOS boot image to the application diskette. To run that application you booted from that diskette. The developers testing the software and writing the publications quickly learned that the easiest way to reboot the PC with a new application was C-A-D, and it was from them that it "escaped" into general usage.
Ctl-Alt-Del was a simple solution to a problem. It wasn't complete, since if the failing program managed to disable the interrupts ( a single byte instruction on the x86) nothing that happened on the keyboard would be signaled to the BIOS. But it worked in most cases. And since it was just one of hundreds of little (and big) problems that we had to solve before the PC could be announced, after 10 minutes of design, coding and testing, it was time to move onto the next problem.
You've spent nearly as much time reading this as I did in creating and implementing C-A-D.
---- Bill Selmeier <bills at right-net.com> wrote:
> =======================================
>
> Posts to inforoots at computerhistory.org is information known to or the opinions of the poster. All posts to inforoots at computerhistory.org are archived. By posting to this list you grant a license for use of this material to the Computer History Museum located in Mountain View, California, USA.
>
> =======================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pckeyboard-small.jpg
Type: image/jpeg
Size: 101022 bytes
Desc: not available
Url : http://mail.computerhistory.org/pipermail/inforoots/attachments/20080427/b53c28ce/pckeyboard-small-0001.jpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: C-A-DInstructions.JPG
Type: image/jpeg
Size: 51227 bytes
Desc: not available
Url : http://mail.computerhistory.org/pipermail/inforoots/attachments/20080427/b53c28ce/C-A-DInstructions-0001.jpe
More information about the inforoots
mailing list