what's wrong with my keyboard ISR?

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
chendsh

what's wrong with my keyboard ISR?

Post by chendsh »

hello,
I wrote a simple ISR to test keyboard interrupt. It just prints
a string on the screen if a keyboard interrupt occurs. But when I
pressed a key, the 0xD(General Protection Fault)
handler was firstly activated and then the
keyboard handelr, (0x21) and then the PC restarted.
What's wrong with it?

I used LIDT before I changed into P-Mode. The IDT table is
in the .data section.
And I think I have remapped IRQ0-15 to INT 20H~ INT2FH.
The ESP points to a reserved area in .bss section after
changing into P-Mode.

looking forward to your kind advice, thanks
carbonBased

RE:what's wrong with my keyboard ISR?

Post by carbonBased »

Hard to diagnose without a peek at the code...

My first impression would be that your IDT entry is invalid/incorrect.

Jeff
Post Reply