Old computers. New hardware. Questionable ideas.

The 8042's bit 2 is the speed line

A month after the turbo business, I wanted to know how the speed switch actually works. That evening a little probe program poked the keyboard controller's output port. Clearing one bit lit the 8 MHz light and slowed the machine right down (a timing loop went from 46 ticks to 72), and setting it again brought back 12 MHz. So the speed switch is a single bit on the same port that drives the A20 gate.

That mattered about a minute later. I ran my test program, which flips A20 about a thousand times, and afterwards the machine was fast again. Atlas's A20 code was rebuilding that port from a copy saved at power-on, with the fast bit set, so any A20 call quietly undid the speed change. Ctrl+Alt+Del did the same thing.

HIMEM.SYS turned out to do it too, with its own A20 calls. With HIMEM loaded, a slow setting only lasted until DOS did something. With HIMEM's CPU-clock option turned on, it stuck. That same HIMEM side of things came back later as S1, where the speed display says slow while the CPU is actually running fast.