|How fast is a PS/2 keyboard?|
|By Thom Holwerda on 2018-08-06 21:01:00|
A few weeks ago, an interesting question cropped up: How fast is a PS/2 keyboard? That is to say, how quickly can it send scan codes (bytes) to the keyboard controller?
One might also ask, does it really matter? Sure enough, it does. As it turns out, the Borland Turbo Pascal 6.0 run-time, and probably a few related versions, handle keyboard input in a rather unorthodox way. The run-time installs its own INT 9/IRQ 1 handler (keyboard interrupt) which reads port 60h (keyboard data) and then chains to the original INT 9 handler… which reads port 60h again, expecting to read the same value.
That is a completely crazy approach, unless there is a solid guarantee that the keyboard can’t send a new byte of data before port 60h is read the second time. The two reads are done more or less back to back, with interrupts disabled, so much time cannot elapse between the two. But there will be some period of time where the keyboard might send further data. So, how quickly can a keyboard do that?
I love these questions.
- How Michael Dell saved his company from the brink - 2018-08-13
- How the shared family computer protected us from our worst selves - 2018-08-10
- The Chinese typewriter: a history - 2018-08-09
- What is the BASIC Engine? - 2018-08-02
- More related articles