Re: [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-11 22:20:08
|
Hi Luca, > I think the solution is very simple: instead of doing > __dpmi_set_protected_mode_interrupt_vector(version.master_pic + irq, > &handler_address); > the DJGPP version of fd32_set_handler() should do something like > __dpmi_set_protected_mode_interrupt_vector(version.master_pic + irq, > &djgpp_wrapper); > where djgpp_wrapper() is a function that calls the real handler (looking > at a dr-env internal handler table), and does the proper EOI; iret on > return. > > In this way, no external difference in the dr-env interface is visible. > The only thing that we need to do is to introduce a new .c file that is > linked when the DJGPP version is compiled. Sounds good. (No, I'm not drinking a beer :-) I'll try to cook up something tomorrow. > I also seem to remember that DJGPP provides an alternative to > __dpmi_set_protected_mode_interrupt_vector(), which takes care of > sending EOI end doing iret, but I do not remember the details (I had > some problems with it). I only remember the __go32_dpmi... as an alternative, but I'll try to browse the DJGPP's libc documentation. As a final note... waiting for your signal for release 0.0.2. Bye, Salvo |