www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/16/02:37:30

Date: Wed, 16 Dec 1998 09:37:16 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Corey Harwell <gadwall AT mobiletel DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: installing ISR's
In-Reply-To: <36774114.D95ED2DE@mobiletel.com>
Message-ID: <Pine.SUN.3.91.981216092542.22373D-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com


On Wed, 16 Dec 1998, Corey Harwell wrote:

> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML>

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019