IO
-
How are the mouse keyboard and screen cables built up? And what is the output of them? If I for example press K on the keyboard, what happends? The PROgrammer Niklas Ulvinge aka IDK
-
How are the mouse keyboard and screen cables built up? And what is the output of them? If I for example press K on the keyboard, what happends? The PROgrammer Niklas Ulvinge aka IDK
-
How are the mouse keyboard and screen cables built up? And what is the output of them? If I for example press K on the keyboard, what happends? The PROgrammer Niklas Ulvinge aka IDK
If you press K there will be an interrupt, and the device driver will read some port data which represents a scan code. This scan code is translated to an ascii code (the current code page is used for translation). Isn't it easy? ;P Don't try it, just do it! ;-)
-
If you press K there will be an interrupt, and the device driver will read some port data which represents a scan code. This scan code is translated to an ascii code (the current code page is used for translation). Isn't it easy? ;P Don't try it, just do it! ;-)
The scan code will also be dependent on the mode the keyboard is in, XT or AT. You will actually also get 2 scan codes. The first is termed a "make code" which occurs when the key is pressed. The second is a "break code" which is sent when the key is released. In XT mode this is simply distinquished by setting the high bit of the scan code for a break code and clearing it for a make code. You then have two sets of extended keys which are "E0" and "E1" prefixed followed by one or two more scan codes to represent the key. AT protocol is a bit different. Make codes and Break Codes I believe are prefixed instead of setting the high bits (if my memory serves me correctly). As far as I remember, Windows 9x still actually set the keyboard into XT mode so break codes and make codes were determined using the high bits (and some keyboards would send E1/E0 for a break code you'd have to do special detection, I believe that perhaps the PC98 may have done this but I don't remember, been a while since I wrote a keyboard filter). 8bc7c0ec02c0e404c0cc0680f7018827ebee