Only the first IRQ is handled
Posted: Thu Nov 15, 2007 5:25 pm
OK.
I made the GDT and the IDT, and I´m already handling exceptions. Then, I was trying to test if IDT was working. After remapping the PIC, made something like:
---------------------------------------------------------------------
SetIDTGate(32, (unsigned long)Irq0, CODE_SEG, IS_PRESENT, 0);
SetIDTGate(33, (unsigned long)Irq1, CODE_SEG, IS_PRESENT, 0);
And function Irq0 and Irq1 are:
void Irq0{
puts("IRQ0 fired");
outportb(0x20, 0x20); /*END OF INTERRUPT master controller*/
}
void Irq1{
puts("IRQ1 fired");
outportb(0x20, 0x20); /*END OF INTERRUPT master controller*/
}
------------------------------------------------
I was running it and the only a single message "IRQ0 fired" was on the screen. This was expected, cause I didnt programmed the PIT, so I guess it fires just once(doesnt it?). But I tried to hit some keys and nothing happened.
I know I am missing something but everything seems quite logical to me: I hit a key-> CPU recieves an IRQ-> My IDT is checked and there is my Irq1 function address, but the function is never called.
What am I missing??????????????????????
sorry for my poor english
I made the GDT and the IDT, and I´m already handling exceptions. Then, I was trying to test if IDT was working. After remapping the PIC, made something like:
---------------------------------------------------------------------
SetIDTGate(32, (unsigned long)Irq0, CODE_SEG, IS_PRESENT, 0);
SetIDTGate(33, (unsigned long)Irq1, CODE_SEG, IS_PRESENT, 0);
And function Irq0 and Irq1 are:
void Irq0{
puts("IRQ0 fired");
outportb(0x20, 0x20); /*END OF INTERRUPT master controller*/
}
void Irq1{
puts("IRQ1 fired");
outportb(0x20, 0x20); /*END OF INTERRUPT master controller*/
}
------------------------------------------------
I was running it and the only a single message "IRQ0 fired" was on the screen. This was expected, cause I didnt programmed the PIT, so I guess it fires just once(doesnt it?). But I tried to hit some keys and nothing happened.
I know I am missing something but everything seems quite logical to me: I hit a key-> CPU recieves an IRQ-> My IDT is checked and there is my Irq1 function address, but the function is never called.
What am I missing??????????????????????
sorry for my poor english