|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.
- Reusing old hardware - 2018-10-26
- High-res graphics on a text-only TRS-80 - 2018-10-19
- Why do computers use so much energy? - 2018-10-05
- The engineering miracle of the Sinclair ZX Spectrum - 2018-10-02
- More related articles