Hi Alejandro,
If you look in machdep.c, you'll find a piece of code that looks like this:
Void gcCStack() { /* Garbage collect elements off */
Cell stackTop = NIL; /* C stack */
Cell *ptr = &stackTop;
#if SIZEOF_INTP == 2
if (((long)(ptr) - (long)(CStackBase))&1)
fatal("gcCStack");
#elif STACK_ALIGNMENT == 2 /* eg Macintosh 68000 */
if (((long)(ptr) - (long)(CStackBase))&1)
fatal("gcCStack");
#else
if (((long)(ptr) - (long)(CStackBase))&3)
fatal("gcCStack");
#endif
...
}
(This is the piece of code that is failing.)
The purpose of this code is to check an assumption that is used in the
second half of the function: that any pointers on the stack occur at
even addresses (or, on some machines, at addresses that are multiples
of 4).
I'm pretty sure that DOS compilers always put pointers at even addresses
so the only way this test could fail is if SIZEOF_INTP (== sizeof(int*))
was not == 2.
Can you:
1) check that config.h defines SIZEOF_INTP to 2.
2) Using a debugger, set a breakpoint on gcCStack and check which
of the three tests it is using.
3) recompile and let us know how you get on.
Alastair
ps You've probably guessed that we don't test Hugs on DOS machines
anymore. In fact, I've no idea whether it still works or whether it
can be made to work in the memory limitations of DOS.
If it turns out that you just can't build a working version of Hugs 1.4,
you might try one of the smaller versions of Hugs on Mark Jones' web
page or try gofer which is even smaller. These versions don't have
the Haskell 1.4 module system or as many libraries but for many
purposes, you can't tell the difference.
In fact, many people prefer Hugs 1.3c to Hugs 1.4 because it has a much
nicer type system - well beyond what Haskell 1.4 allows.