Date: Wed, 16 Dec 1998 09:37:16 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Corey Harwell cc: djgpp AT delorie DOT com Subject: Re: installing ISR's In-Reply-To: <36774114.D95ED2DE@mobiletel.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Wed, 16 Dec 1998, Corey Harwell wrote: > > Please do not post in HTML. > The faq was very confusing to me about interrupt handlers > (probably because i'm used to real-mode programming =P ) Please tell what was confusing in the FAQ. I cannot make the FAQ better if you don't tell what's wrong with it. As far as I could see, the FAQ doesn't assume any knowledge about protected-mode programming. The FAQ also includes pointers to examples of interrupt hooking in DJGPP; did you look at those? > /* holds old interrupt handler */ > void (_interrupt _far *Old_Serial_ISR)(); This declaration should be changed to the type returned by the function you use to get the old handler, either __dpmi_paddr *Old_Serial_ISR (if you use __dpmi_get_protected_mode_interrupt_vector), or _go32_dpmi_seginfo *Old_Serial_ISR (if you use the _go32_dpmi_... variety). > void _interrupt _far Serial_ISR(void) This should be just void Serial_ISR. > Old_Serial_ISR = _dos_getvect(INT_SERIAL_PORT_0); The FAQ explains (in section 18.9) that you need to use one of the above-mentioned functions instead of _dos_getvect. > _dos_setvect(INT_SERIAL_PORT_0, Serial_ISR); The FAQ explains that you need to call either __dpmi_set_protected_mode_interrupt_vector or _go32_dpmi_set_protected_mode_interrupt_vector library function for this.