delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/16/04:42:07

Date: Sun, 16 Apr 2000 10:08:13 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Andrew Hakman <hakmana AT hotmail DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Page Fault with 387 emulation
In-Reply-To: <38F5F960.356BD03F@hotmail.com>
Message-ID: <Pine.SUN.3.91.1000416100724.2482M-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 13 Apr 2000, Andrew Hakman wrote:

> > DJGPP comes with emu387.dxe which is automatically loaded by an
> > application if the FPU processor is unavailable.  Alternatively, you
> > could install WMEMU (get v2misc/wmemu21b.zip from SimTel.NET), which
> > is a better emulator, but it is distributed under the GNU GPL
> > license.
> 
> So if I just throw emu387.dxe in the same directory as the .EXE, will it
> automatically pick it up

Yes, the startup code does this.  You need the emu387 environment
variable to be set to point to the emulator, but DJGPP.ENV already
takes care of that for the case of emu387.dxe.

> > > The lines of code that were actually causing the page fault (I tracked
> > > them down with LOTS of COUTs) were:
> > >
> > > packet_buffer.packets[packet_buffer.buffer_pos].data1=recieve_packet.data1;
> > >
> > >
> > > packet_buffer.packets[packet_buffer.buffer_pos].data2=recieve_packet.data2;
> > >
> > >
> > > packet_buffer.packets[packet_buffer.buffer_pos].data3=recieve_packet.data3;
> > >
> > > I don't see anything wrong with these, and neither does a 486 or q87.
> >
> > Are you sure all the variables in these lines have valid addresses?
> 
> How could I go about testing/finding these addresses?

Print them.

> That very well could be the
> problem, but in that case, wouldn't it page fault all of the time since it is
> accessing out of range memory?

They might be faulty some of the time, for some strange reason.  Perhaps 
the q87 emulator is not really compatible with DJGPP.

- Raw text -


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