www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/08/31/00:20:23

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <9908310349.AA12479@clio.rice.edu>
Subject: Re: FWAIT emulation in emu387.cc
To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
Date: Mon, 30 Aug 1999 22:49:37 -0600 (CDT)
Cc: dj AT delorie DOT com, djgpp-workers AT delorie DOT com, terra AT diku DOT dk
In-Reply-To: <Pine.SUN.3.91.990830095710.3558J-100000@is> from "Eli Zaretskii" at Aug 30, 99 09:59:49 am
X-Mailer: ELM [version 2.4 PL20]
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> How come it works on DOS, you ask?  Well, it seems that on DOS, FWAIT
> never gets into the emulator!
> Charles, is this expected behavior?  

I don't know ... there are some bugs in "disabling" the FPU with
CWSDPMI on a machine with the FPU - it seems some instructions get
executed anyway.  Maybe this is the issue?  In any case, I found you
need a real FPU-less machine to test emulation...

> Intel manuals say that FWAIT
> generates the coprocessor not present exception when the MP and TS
> flags in CR0 are set.  I guess Windows sets these flags (although
> Intel recommends to leave it cleared) while on plain DOS they remain
> unset, right?

So long ago ... I don't remember.

> The Intel manual says the EIP points to FWAIT when it generates the
> exception.  So it seems like we need to resurrect that line.  Does
> anyone remember why it was commented out?

I think it was commented when I did the initial V2.0 beta port in 
1994 ... 

I could probably find a copy to find out if it was important... I just
burned all the ancient disks onto CD :-)

- Raw text -

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