Page 1 of 1

Freakin interrupt handlers!!

Posted: Wed Aug 02, 2006 3:44 pm
by Origami Chemist
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

Posted: Wed Aug 02, 2006 4:18 pm
by matthias

yes

Posted: Thu Aug 03, 2006 7:36 pm
by Origami Chemist
matthias wrote:I think this will be of use: http://www.osdever.net/bkerndev/index.php?the_id=90
Thanks, that thing is excellent. My interrupt handlers now work and I can crash the system by dividing by zero!! I never thought I would love a system hang so much. :D