[FreeDOS-32-dev] Problems with IRQ handlers in floppy driver
Status: Pre-Alpha
Brought to you by:
salvois
From: Salvo I. <sa...@us...> - 2003-09-10 09:53:00
|
Hello, I'm changing the floppy driver in order to use dr-env. But I'm having problems with IRQ handler routines. In my original DJGPP portab.c I used to allocate an IRET wrapper using GO32 helpers. My IRQ6 routine just did the following: void irq6(void) { irqsignaled = 1; outb(0x20, 0x20); } Now I'm using fd32_set_handler(6, irq6) to set my IRQ6 handler, but if called as it were I get a General Protection Fault. In fact, I was wondering how it could work without IRETing. I managed to have it working placing: fd32_sti(); asm("pop %ebp"); asm("iret"); } just before the end of the function, but I don't know if it is the correct thing nor if there is a better solution (other than swapping sti and pop ebp, if necessary). For example, in Luca's keyboard driver I don't see any of this stuff in the IRQ1 handler, and it works. Please let me know, Salvo |