delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/07/14:20:38

Date: Wed, 5 Apr 2000 11:26:09 +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 IPX Library and 387 Emulation
In-Reply-To: <38E8E68C.88C17E8B@hotmail.com>
Message-ID: <Pine.SUN.3.91.1000405112543.20661C-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 Mon, 3 Apr 2000, Andrew Hakman wrote:

> Thanks for the help. I sort of understand what you mean (just beginning to
> learn assembly - just finished implementing a "teaching" asember language
> with only 4 registers and 1000 memory locations in DJGPP for discrete
> structures and programming course I'm taking), but can't seem to find
> anything related in the code.

One problem I see is that you don't lock the real-mode callback.  You
*must* lock its code and all the data it accesses.  See section 18.9
of the DJGPP FAQ for details.

One easy way of doing that is to lock everything by setting the
_CRT0_FLAG_LOCK_MEMORY bit in the _crt0_startup_flags variable, as the
FAQ suggests.  If that makes the crashes go away, you can do a more
selective lock, to avoid excessive requirements for physical memory on
the target machine.

Another issue is the use of _go32_dpmi_simulate_int.  I suggest to
replace all its uses with __dpmi_int.  The latter is safer for several
subtle reasons I won't go into.

Other than that, if the code you posted is all there is to it, then
the DS issue should actually be okay, because the library wrappers you
use take care of that.

- Raw text -


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