Checksum: 65365
Lines: 28
Path: utzoo!sq!hobie
From: hobie@sq.uucp (Hobie Orris)
Date: Sun, 13-Dec-87 23:15:30 EST
Message-ID: <1987Dec13.231530.16616@sq.uucp>
Newsgroups: comp.sys.amiga
Subject: Manx Linker Problems
Reply-To: hobie@sq.com (Hobie Orris)
Distribution: na
Organization: SoftQuad Inc., Toronto


	I have been trying to port Moria to the Amiga, but the Manx linker has
been giving me a hard time.  There are two very large arrays of structures, 
about 26k and 44k compiled, which compile just fine, but which cause this vexing
error on link:

File  Attempted to write outside of file bounds @52800! B=4455c,
v=e2a4,s=524f0

No mention of this sort of thing in the manual.  This one I can probably get
around, but the second error looks a little more devious.  Moria is really big,
around 350K, and it gurued in OpenWindow.  I made a little test program to test
that my window opening code was correct, and of course it was.  I saw that Open-
Window() first pulls the NewWindow pointer off the stack, then loads 
IntuitionBase into a6, then jumps relative to it.  In the monster Moria 
executable (compiled, as was my test program, with +C +D +L) instead of loading
IntuitionBase into a6, it loads some random value (db named it as 
_inventory_init+19c).  Is there something I don't know about?  Anyway, while 
single-stepping, I patched the correct value in a6 and the window opened.  
However, at closing time, the machine gurued again, due to the same cause I 
suspect.  

Any suggestions towards the solving of these two problems will be appreciated by
both me and all future Amiga Moria players!

 Hobie Orris			 	| 	
 guest of SoftQuad Inc., Toronto, Ont.	|"There'll be no more giant leeches
 {ihnp4 | decvax | ? }!utzoo!sq!hobie	| When you find the good Lord Jesus"