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.
Problem with floppy driver - IRQ6 not firing
Moderator:Moderators
-
- Posts:22
- Joined:Sat Jul 17, 2010 7:55 am
-
- Posts:92
- Joined:Thu May 27, 2010 8:54 pm
- Location:Netherlands
Re: Problem with floppy driver - IRQ6 not firing
I was going through the code you posted in your first post, and I found this bit:
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.
Code: Select all
// Install handler
i86_irq_install_handler(6, i86_floppy_handler);
I have the floppy drive tied to IR 38, which corresponds to PIC IRQ 6, and it works.
-
- Posts:22
- Joined:Sat Jul 17, 2010 7:55 am
Re: Problem with floppy driver - IRQ6 not firing
halofreak1990 wrote:I was going through the code you posted in your first post, and I found this bit: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.Code: Select all
// Install handler i86_irq_install_handler(6, i86_floppy_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.