Page 1 of 1

irq handling

Posted: Wed Jul 11, 2007 10:22 am
by singularity
Hi, there...

I've set up interrupts, exceptions, the PIT and the irq0 ISR. Interrupts and exceptions are working, PIC is remapped and only irq0 is unmasked. So far, so good...but when i enable interrupts, the handler for irq0 gets called only once (yes, I acknowledge the irq...).
There's no exception (and bochs doesn't display any error)...it simply hangs there after the first interrupt... :x

ISR for irq0:

Code: Select all

irq0:
cli
pushad
push ds
push es
push fs
push gs
mov ax, 0x10   ; Load the Kernel Data Segment descriptor!
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
push eax
mov eax, irq0Handler
call eax
pop eax
pop gs
pop fs
pop es
pop ds
popad
iret
I know, there's a wiki page for interrupt-troubleshooting (I've read it) and I've used the search function...and still, i just can't figure out, what's causing this...so, please help...

greetings, singularity

Posted: Wed Jul 11, 2007 11:15 am
by mathematician
Are you sure you have programmed the PIT so that it produces a square wave, rather than just a one off interrupt?

Posted: Wed Jul 11, 2007 11:22 am
by singularity
yeah, I'm using mode 0 (interrupt when count reaches zero)...

EDIT: problem solved...mode 0 is obviously wrong (fires one interrupt, then off...). Must have missed this, when I read the PIT wiki page -_-

Thank you!