Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!homxb!mtuxo!rolls!doug!tim From: tim@doug.UUCP (Tim J Ihde) Newsgroups: comp.sources.bugs Subject: Re: PC Nethack 2.2 bugs + help wanted linking Summary: fix for stack+data > 64K Message-ID: <384@doug.UUCP> Date: 9 Dec 87 14:48:41 GMT References: <492@silver.bacs.indiana.edu> <428@pcrat.UUCP> Organization: AT&T ISL - Somerset, NJ Lines: 36 In article <428@pcrat.UUCP>, rick@pcrat.UUCP (Rick Richardson) writes: > > I can't even get a link with MS C 5.0. Complains about stack and data >64K. > This means that the default data segment, which contains initialized global data and the stack, is larger than 64K. With the good 'ol *86 machines, this is the big nono. What you need to do to get around this is to look at some of the files that contain lots of initialized globals and tell the compiler to use a segment other than the default for that modules data. I don't remember the exact files I used, but it seems that one of the shopkeeper files was a good candidate. The syntax for telling the compiler to move initialized data to segment other than the default is to add: -Au -ND MOREDATA to the MSC command line. This will create a separate data segment for this module called MOREDATA and put all initialized data into it. Append this ONLY for the files that have lots of data. Once this is done the linker should not complain. You will probably have to do this for several files, but hey - that's the fun of segments. :-) tim PS This technique was developed with the old version of NETHACK, I haven't actually tried 2.2 yet. Must download all the files first . . . -- Tim J. Ihde ihnp4!ctsmain!doug!tim (201) 535-9897 Ok, we can all agree that this is my fault.