Date: Wed, 5 Apr 2000 11:26:09 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Andrew Hakman 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.