someone should have stolen this meme for my intro computer architecture course it would have helped
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.
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.
Right, PS/2 cable. I remember having to reboot, if you accidentally unplugged it.
Oh, you're right! I completely forgot that was a thing. But I do remember the "keyboard not found, press f1" message.
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?
My guess would be yes, the whole point of including a legacy port like this would be compatibility. Laptops used (still use?) PS/2 long after desktops moved to USB keyboards because the lack of polling meant improved battery life, so it'd make sense for the hardware support to still be there.
The other commenter is on the right track but the chip controls both USB and PS/2 as well as others;
In the 90s and 2000s, for x86 machines, slower I/O was handled by a chip called the Southbridge which worked in conjunction with a chip called the Northbridge that handled faster I/O like IDE and PCI. Later these were integrated into a single chip and, as of recent processor generations, into the processor itself.
AFAIK ghosting and key rollover are issues when using PS/2 but it can offer some milliseconds off latency when used in high cpu games.
AFAIK ghosting and key rollover are issues when using PS/2
I think it's more of an issue for USB keyboards than PS/2 keyboards.
They are wholly independent from the protocol or interface. Ghosting is an electrical issue that is a result of keyboards being a bunch of switches arranged in a matrix. It makes the keyboard's controller register an extra keypress in certain conditions. Nothing to do with how the thing communicates with the host computer.
Key rollover issues can be related to ghosting. The limit for it is once again the keyboard's design at the circuit level, not its communication protocol.
Really they're both related to how cheaply built the keyboard is. That's the only thing.
Think of it like breaking news for your processor
"WE INTERRUPT THE CURRENTLY RUNNING APPLICATION TO BRING YOU THIS MESSAGE: e"
PS/2 ports?
I'm still mad they killed PS/2 on recent motherboards. So much for NKRO I guess.
NKRO is available for USB keyboards too.
Ehhh.
So, the initial, and real reason that NKRO was introduced was to deal with inexpensive keyboards that used grid encoders. This requires that each key be assigned a place on a grid, with each row and column having a wire associated with it. When you push a key, it sends the associated pair of wires high voltage. The keyboard encoder chip has those wires running to its pins.
Such a scheme can permit detecting any one key going down, which will always set two wires to high voltage. It can permit detecting any two keys going down, since that will always set at least one more line to high voltage, which will uniquely identify the key. But beyond that, additional keys may not be possible to uniquely identify (and, in fact, pushing one may send only lines that are already high to high, which is totally invisible to the encoder), and so it may ignore additional keys.
This prevents a grid-based encoder from doing NKRO.
If you want to do NKRO, you have to have a unique line coming from every keyswitch, which costs money.
There is a second issue with NKRO.
You can have a keyboard that can have NKRO to the encoder, rather than a grid. And can have a USB interface to talk to the computer.
But last I looked, USB has a protocol limitation that cannot support NKRO, and this was a major reason that you could still get some dual-interface keyboards with PS/2 support and USB recently.
PS/2 is edge-triggered by a key. A key goes down, the computer gets a message. A key goes up, the computer gets a message. All that message says is "this key went down" or "this key went up". The computer maintains a list of keys and its idea of the up or down state of them.
This is also why PS/2 keyboards can sometimes have keys that appear to be "stuck" that get unstuck when you tap them
if the computer misses the "up" message for some reason, then it only gets notified about it next time the key changes state and the computer gets a message about it.
USB doesn't work like that. When a USB keyboard sends an event, it contains a dump of the keyboard state. Every keypress, new dump. However, there's a restriction on the size of the message. It can only contain....I think it's seven keys that are down, plus modifier keys.
kagis
Six keys.
In practice, six is probably enough for pretty much anyone. The real problem was grid encoders, as a video game player might legitimately hit three or four keys at once. But...it still isn't, strictly-speaking, NKRO unless it can do all.
It looks like there are basically two approaches that keyboards have used to try to provide a similar effect. One is to just invent a proprietary protocol, and rely on that and a driver rather than the standard USB keyboard behavior.
The other is to tell the computer that the keyboard is a whole array of keyboards. Since most OS environments can use multiple keyboards and just use their input, such a keyboard can pretend to have multiple keyboards pressing buttons.
You're describing the boot keyboard, not the full USB HID protocol. It is true that there are some keyboards that only support NKRO, but the USB HID protocol has supported NKRO forever. https://www.devever.net/~hl/usbnkro
Hah! This might be the best use of this meme template I've seen. And this template has a lot of good ones.
linuxmemes
Hint: :q!
Sister communities:
Community rules (click to expand)
1. Follow the site-wide rules
- Instance-wide TOS: https://legal.lemmy.world/tos/
- Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
2. Be civil
3. Post Linux-related content
sudo
in Windows.4. No recent reposts
5. π¬π§ Language/ΡΠ·ΡΠΊ/Sprache
6. (NEW!) Regarding public figures
We all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.Please report posts and comments that break these rules!
Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.