Freakin interrupt handlers!!

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.
Post Reply
Origami Chemist
Posts: 2
Joined: Wed Aug 02, 2006 3:23 pm

Freakin interrupt handlers!!

Post 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
"Let him who is without sim cast the first stone..."
User avatar
matthias
Member
Member
Posts: 158
Joined: Fri Oct 22, 2004 11:00 pm
Location: Vlaardingen, Holland
Contact:

Post by matthias »

The source of my problems is in the source.
Origami Chemist
Posts: 2
Joined: Wed Aug 02, 2006 3:23 pm

yes

Post 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
"Let him who is without sim cast the first stone..."
Post Reply