Freakin interrupt handlers!!
Posted: Wed Aug 02, 2006 3:44 pm
So for no particularly good reason I have started to work on a toy OS. I actually got the thing to where it boots under GRUB using multiboot in pretty short order. The problem is that I can't seem to get any interrupt handlers to work, which is sort of crucial. I'm trying to get a basic keyboard handler to work so that you get a nice character on the screen when you press a key. The kernel gets up and running in protected mode and the code that loads the interrupt vector table memory locations below is running (I run this thing under Bochs so I can examine the memory while it runs). The problem is that the handler located at the memory location pointed to isn't being run when a key is hit. Actually, I don't even know if this is the right interrupt for that (int 09h so we're at 9 * 4 = 0x24). I'm also loading zeros into the PICMASK to remove any masks that might be there. I think this is the right thing to do? I'm really new at this stuff and the project is just 2 days old. Any help appreciated.
Code: Select all
#define KEYHANDLER 0x24
#define PICMASK 0x21