Mail Archives: djgpp/2000/04/07/14:20:38
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 -