Newsgroups: rec.arts.int-fiction
Path: gmd.de!xlink.net!rz.uni-karlsruhe.de!news.uni-stuttgart.de!news.belwue.de!zib-berlin.de!zrz.TU-Berlin.DE!netmbx.de!Germany.EU.net!EU.net!uunet!gatekeeper.us.oracle.com!sgiblab!wetware!kaiwan.com!cinnamon
From: cinnamon@kaiwan.com (R. Dominick)
Subject: Re: More on Inform for the PC
Message-ID: <CHn26D.24y@kaiwan.com>
Organization: Coffeehouse Software
X-Newsreader: TIN [version 1.2 PL2]
References: <9312051845592.bnewell.DLITE@delphi.com>
Date: Tue, 7 Dec 1993 00:18:12 GMT
Lines: 29

Bob Newell (bnewell@delphi.com) wrote:

> So clearly the memory management is a big problem (duh).  Of course, I can't
> be certain that I got everything right when I split it up, either... anyone
> else have experiences to share?

...I had mostly the same experiences with trying to port Inform, and thinking
about it, have come up with yet another thing it could be: the pointer
arithmetic.  DOS pointers are NOT pointers to a flat memory space, and the
Large and Huge memory models use segmented pointers.  In fact, the segments
used as data segment(s) by Turbo C++ don't even have to really be contiguous
(I don't know about other compilers).

Inform relies on performing math operations on pointers - there's a macro for
this near the beginning of the .C file (#define subtract_pointers(p1,p2))
which basically assumes that pointers are flat pointers and fit into a 32-bit
integer.

It's just a guess, and since I a) only have djgpp on my system at the moment
(and am developing some other software with it), and b) don't have the room
for TC on the hard drive (20MB is unrealistic; I *need* a new hard drive!),
and furthermore c) wouldn't know how to fix it (the Huge memory model is
a bit fuzzy to me; I usually program in Small or no model at all)...

...but it is an idea.

--roger
-- 
don't be alarmed, it's only a kiss
