To: Paul Engel who wrote (1632 ) 10/22/1997 8:40:00 PM From: Ali Chen Read Replies (1) | Respond to of 6843
Paul, That's basically how the Keyboard Works, . No, it is not how it works TODAY. I did not realize that a MIT PhD could be so lazy and/or dumb. What you have described here is the 8088 XT keyboard, about 20 years old, not even PCjr or AT. That is exactly I am telling to everyone - you are outdated, and judge modern trends from ancient prospective. Which rotten guide did you use to compile your essay? Needless to say, you failed miserably. Let me walk you through many of your mistakes. 1. You "forgot" to mention that the very essential function of contemporary keyboards (so-called MF-II type, not even AT) is to send defferent MAKE and BREAK codes for each key, with so-called "precodes", and much more complex code sequences. This allows to recognize several simultaneously depressed keys, left and right control keys, etc. - very useful feature for games... 2. You forgot that the keyboard-to-host protocol is bi-directional, so the keyboard can be reprogrammed to certain extent. At least, the host can use RESEND and about 16 other commands to keyboard, to provide no-loss protocol... I am not even talking here about debouncing firmware, N-key rollover, and watch-dog techniques. 3. The Keyboard Clock/Keyboard Data lines are fed into some logic circuitry in the chip set that, when Data is present... You apparently are not aware that this "circuitry" is comprised of one more microcontroller of 8742 type on motherboards (as a separate chip or integrated), with rather complex duties including full-duplex support for serial keyboard protocol, as well as PS/2 mouse port. 4. The data comes in serially, clocked into the I/O port by the Keyboard Clock line. The CPU reads each bit, then stores it in an internal register until 16 bits are read - two bytes. "Little" mistake again, Dr. Endel. The keyboard data format is still 8-bit (+parity, start, and stop). CPU reads nothing yet, all transfers and serial-to-parallel conversions are done by that microcontroller. The 16-bit will appear much later.. 5. This Hardware Interrupt causes the main processor (CPU) to stop (after completing its current instruction) and branch to a software routine in the BIOS chip (software Interrupt 16Hex). This routine, the Keyboard Routine, is then executed by the main CPU. You recompile your old book with many mistakes here. Hardware interrupt routine and INT16h routine are completely different and serve different functions. Using the hardware IRQ1 (INT09), one BIOS routine reads data from the 8742 controller, analyses them, converts into ASCII, and put into a special ring buffer, now in that legacy 16-bit format you mentioned before. Completely different and asynchronous routine, the DOS INT16 service, is called from old DOS software and provides these 16-bit words from that ring buffer until empty. And remember, the CPU never stops when receiving an interrupt... 6. Application programs receive their keyboard input by simply reading the value in the AL (or AL & AH) registers following a Keyboard-generated Interrupt. Actually, I expected next to see now those characters appear on your screen and combine into your dirty posts. You stopped in half a way. I suppose you do not use the outdated DOS applications anymore but mostly use the power of M$ Windows95, do you? However, at the times when you studied XT computers, there was no Windows yet. Therefore I am afraid to ask about your "vision" of keyboard virtual drivers, DPC (deferred procedure calls), scallable fonts, and other Microsoft Windows goodies that happen before a character appears on your screen. I assume you are taking a beginning class in PCs and need this information to help pass a homework problem or exam. No, I am taking practical exercises. As you see, there is not too much you can help me with. Now, "expert", do you feel to hit the road, off AMD threads?