Demo 8 problem
Posted: Mon Sep 21, 2009 7:13 pm
i have written my pit irq handler as follows (using gcc and nasm to compile)
//! pit timer interrupt handler
void i86_pit_irq () {
asm ("add $12, %esp");
asm ("pusha");
//! increment tick count
_pit_ticks++;
k_printf("pit irq handler");
//! tell hal we are done
interruptdone(0);
asm ("popa");
asm ("iret");
}
the problem is handler is getting called and the string in k_printf is getting printed but upon calling iret invalid opcode exception is getting triggered.

am i missing something? i am stuck at this for the whole day.
code can be browsed at
http://code.google.com/p/zygote/source/ ... svn/trunk/
//! pit timer interrupt handler
void i86_pit_irq () {
asm ("add $12, %esp");
asm ("pusha");
//! increment tick count
_pit_ticks++;
k_printf("pit irq handler");
//! tell hal we are done
interruptdone(0);
asm ("popa");
asm ("iret");
}
the problem is handler is getting called and the string in k_printf is getting printed but upon calling iret invalid opcode exception is getting triggered.

am i missing something? i am stuck at this for the whole day.
code can be browsed at
http://code.google.com/p/zygote/source/ ... svn/trunk/