I feel like I should understand this, but I don’t.
This is x86 assembler. (Actually, looking at the register names, it’s probably x86_64. On old school x86, they were named something like al, ah (8 bit), ax (16 bit), or eax (32 bit).) Back in the old days, when you pressed a key on the keyboard, the keyboard controller would generate a hardware interrupt, which, unless masked, would immediately make the CPU jump to a registered interrupt handler, interrupting whatever else it was doing at the point. That interrupt handler would then usually save all registers on the stack, communicate with the keyboard controller to figure out what exactly happened, react to that, restore the old registers again and then jump back to where the CPU was before.
In modern times, USB keyboards are periodically actively polled instead.
does that mean though that if I connect a PS/2 keyboard or mouse to my relatively modern computer (a “gamer” motherboard made ~6 years ago) 's PS/2 port, that it’ll still trigger such an interrupt?
I think there’s a USB device inside the mobo to handle dumb peripherals. So it would still trigger an interrupt, but it wouldn’t make it to the CPU. The USB keyboard controller would handle it and cache the strokes locally until polled by the CPU.
I would expect that any motherboard that went to the trouble of including a PS/2 port would handle it with a real hardware interrupt, because the whole point of still having those things is to avoid the latency overhead of USB.
Largely an urban legend. The internal electronics of the keyboard/mouse matter more than the protocol for end to end latency.
There are USB keyboards that beat a PS/2 one, at just 125 Hz polling. 1000 Hz polling pulls ahead even more.
But honestly, 1000 Hz polling is just for bigger numbers game. Even 300 ms are barely noticeable by humans, not to mention 10 ms of 100 Hz.
The virgin USB: hey, uh, when you get a chance, uh, if it’s not too much trouble, could you, uh, put an ‘e’ there? Whenever you get the chance is fine
The chad PS/2: THE USER SAID E.


