So I wrote a little kbd IRQ handler:
Code: Select all
kbdirq()
{
char scancode, asciified;
scancode = inportb(0x60);
asciified = scancode_convert(scancode);
if(asciified != 0)
k_printf(temp, 1);
outportb(0x20, 0x20);
}
I know that the scancode is being passed right because if I push (A) on the keyboard, it returns 1E (which is correct), and I know the k_printf can handle temp, because if I initialize it to "A" it can print. I also know that entry 1E (30) in the keymap is 'A'.
The reason this is so frustrating is that all scancode_convert is doing is saying return = keymap[scancode] where keymap is an array of all the lowercase ascii characters, and as I said before, I know that entry 1e is 'A'.
What am I missing here?