www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/11/01:55:22

Date: Mon, 11 Nov 1996 08:43:48 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: ronen AT friendly DOT co DOT il
Cc: djgpp AT delorie DOT com
Subject: Re: Interrupts+emulation considered harmful
In-Reply-To: <3285e9f2.28357936@news.netvision.net.il>
Message-Id: <Pine.SUN.3.91.961111083919.9863G-100000@is>
Mime-Version: 1.0

On Sun, 10 Nov 1996, Ronen Friedman wrote:

> DJGPP 2/2.01, -lemu. The crashes happened in various locations in my
> program, many times in floating point operations, but also in "normal",
> innocent looking code. Those crashes never happened before the first
> hardware interrupt was received.

Did you remember to save the FPU state at the entry to the interrupt
handler and restore it before exit?  This is usually advisable even when
you have an FPU, but might have different effect with the emulator.  If 
the code in the interrupt handler changes anything in the FP registers, 
the interrupted function will find a total mess when it resumes, and 
you get FP exceptions.

Note that I might be dead wrong on this one (I never actually used the 
emulator), so this is just my $0.02.

- Raw text -


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