Date: Mon, 19 Oct 1998 17:03:45 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Olivier Perron cc: djgpp AT delorie DOT com Subject: Re: Questions about protected mode interrupt handler In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Mon, 19 Oct 1998, Olivier Perron wrote: > Now, I've installed the real mode handler using the > _go32_dpmi_allocate_real_mode_callback_iret function and not as you > suggest in the FAQ. The relevant section of the FAQ doesn't fit this case, it is for the case where you want to hook the interrupt in real mode to avoid the overhead of the mode switch and the interrupt reflection when dealing with high rates of interrupts that cannot cope with this overhead. However, in your case, you are working around a bug or misfeature in Windows whereby it doesn't seem to reflect the interrupt to PM. So in your case, the wrapper *is* the solution. > Are there really penalties if I do so ? The wrapper is non-reentrant, so you should make sure it is never called again while the previous instance is active. If you don't EOI the PIC until near the end of your function, this should never happen. I don't know about any other gotchas, but since I didn't even know that Windows doesn't reflect the serial interrupt to PM, you are in uncharted territory, so you will have to find out about the pitfalls as you go. > Do you have some pointers to code snippet which do what you suggest? Not off the top of my head. You might try the PCTIME package (the exact URL in the FAQ) and the other serial libraries written for DJGPP (also in the FAQ, in section 22.3).