Page 2 of 2

Re: Problem with floppy driver - IRQ6 not firing

Posted: Fri Aug 13, 2010 9:16 am
by chibicitiberiu
Okay, so it is unnecessary to disable interrupts during the execution of the handler, thank you for the information. :)


Now back on the topic... the not working floppy interrupt.

Re: Problem with floppy driver - IRQ6 not firing

Posted: Fri Aug 13, 2010 10:49 am
by halofreak1990
I was going through the code you posted in your first post, and I found this bit:

Code: Select all

// Install handler
    i86_irq_install_handler(6, i86_floppy_handler);
Now I'm wondering; how does your i86_irq_install_handler() work, because in my OS, and the tutorials here as well, IR vector 6 is the 'invalid opcode fault' handler.
I have the floppy drive tied to IR 38, which corresponds to PIC IRQ 6, and it works.

Re: Problem with floppy driver - IRQ6 not firing

Posted: Fri Aug 13, 2010 6:33 pm
by chibicitiberiu
halofreak1990 wrote:I was going through the code you posted in your first post, and I found this bit:

Code: Select all

// Install handler
    i86_irq_install_handler(6, i86_floppy_handler);
Now I'm wondering; how does your i86_irq_install_handler() work, because in my OS, and the tutorials here as well, IR vector 6 is the 'invalid opcode fault' handler.
I have the floppy drive tied to IR 38, which corresponds to PIC IRQ 6, and it works.

My IRQ handler creates a 16 pointer array; installing an IRQ handler works like this:
array[IRQ] = function;

The main handler looks if address in array is != 0, and if it is, executes it, otherwise it ignores it.

Found it finally!!! :) The floppy driver was being installed before the "sti" instruction, that was the problem. Fixed it now, and works. Thanks for help everyone.