Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Do you know why? When I poll, I just read the data from port 0x60...
It crashes when I press a key, but first I get some keypresses.
Can someone explain which parts I need to do to poll the keyboard? Or just help me with this one
Looks like your interrupt handler code is wrong somehow. For example, it might be that each time it returns from an interrupt, the ESP value is out by a small amount. Gradually this small amount builds up, so after many timer interrupts, you get a crash. I suspect the keyboard stuff isn't related.
Yes. You will spend too much time trying to read. It sort of depends on how you use it to. In a game its acceptable, because it only polls when it needs input. It would not be useful to get interrupted everytime something happens. But an OS does not work like that. Your poll loop would be time consuming.
Tim Robinson wrote:
Looks like your interrupt handler code is wrong somehow. For example, it might be that each time it returns from an interrupt, the ESP value is out by a small amount. Gradually this small amount builds up, so after many timer interrupts, you get a crash. I suspect the keyboard stuff isn't related.