keyboard IRQ handler
Posted: Tue Aug 12, 2003 11:00 pm
When I tested my keyboard IRQ handler, the following strange thing happened:
(my kernel entered a waiting loop for character input)
(I pressed some key)
The keyboard IRQ handler was called and retrieved the scan code from port 60h. It received 0FAh (ACK).
Now there were two possibilities:
1. If I acknowledge receival of 0FAh by toggling bit 7 in port 61h, the keyboard controller fires IRQs with 0FAh in an endless loop.
2. Otherwise, no more IRQs are generated, no matter which key is pressed.
The same happens if I send a command instead of pressing a key.
What am I doing wrong?
(my kernel entered a waiting loop for character input)
(I pressed some key)
The keyboard IRQ handler was called and retrieved the scan code from port 60h. It received 0FAh (ACK).
Now there were two possibilities:
1. If I acknowledge receival of 0FAh by toggling bit 7 in port 61h, the keyboard controller fires IRQs with 0FAh in an endless loop.
2. Otherwise, no more IRQs are generated, no matter which key is pressed.
The same happens if I send a command instead of pressing a key.
What am I doing wrong?