Problem with floppy driver - IRQ6 not firing

If you are new to OS Development, plan on spending some time here first before going into the other forums.

Moderator: Moderators

chibicitiberiu
Posts: 22
Joined: Sat Jul 17, 2010 7:55 am

Re: Problem with floppy driver - IRQ6 not firing

Post by chibicitiberiu » Fri Aug 13, 2010 9:16 am

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.

halofreak1990
Posts: 92
Joined: Thu May 27, 2010 8:54 pm
Location: Netherlands

Re: Problem with floppy driver - IRQ6 not firing

Post by halofreak1990 » Fri Aug 13, 2010 10:49 am

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.

chibicitiberiu
Posts: 22
Joined: Sat Jul 17, 2010 7:55 am

Re: Problem with floppy driver - IRQ6 not firing

Post by chibicitiberiu » Fri Aug 13, 2010 6:33 pm

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.

Post Reply