Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ucla-cs!zen!cory.Berkeley.EDU!iverson From: iverson@cory.Berkeley.EDU.UUCP Newsgroups: rec.games.hack,comp.sources.bugs Subject: Re: Help w/ NETHACK & MSC v4.0 Message-ID: <3567@zen.berkeley.edu> Date: Wed, 2-Sep-87 19:34:09 EDT Article-I.D.: zen.3567 Posted: Wed Sep 2 19:34:09 1987 Date-Received: Fri, 4-Sep-87 04:36:55 EDT References: <616@hadron.UUCP> <3470@zen.berkeley.edu> <1079@bsu-cs.UUCP> Sender: news@zen.berkeley.edu Reply-To: iverson@cory.Berkeley.EDU.UUCP (Tim Iverson) Organization: University of California, Berkeley Lines: 35 Xref: utgpu rec.games.hack:1213 comp.sources.bugs:237 In article <1079@bsu-cs.UUCP> dhesi@bsu-cs.UUCP (Rahul Dhesi) writes: >In article <3470@zen.berkeley.edu> iverson@cory.Berkeley.EDU.UUCP (Tim >Iverson) writes (about setting a stack for hack.exe under MSDOS): > >>I tried stacks up to 64k, but I always >>got the same lack of stack space. Then I tried smaller stacks - and guess >>what? It worked! The limit is somewhere between 0a00 and 0b00 (a00 works >>fine, but b00 doesn't). If someone out there understands exactly why it >>works with a small stack but not a large one, I'd really like to know. > >A lot of things under MS-DOS are measured in units of 16-byte clicks. Stacks aren't - both using the linker and using exemod, they're measured in bytes. Min/Max *paragraphs* (as in exemod) is measured in 16-byte units. >Also note that, depending upon the memory model and the options you >specify to the compiler, the stack may share a segment with static >(non-stack) data, limiting the stack itself to less than a full >segment. Yes! I just looked at the manual under segements (previously I had looked at the 'stack' and 'heap' entries, but was not enlightened) and it states that in *all* models the stack segment is shared with initialized static and global data. It also presents ways to change this using custom memory models, but then states that if you use a custom model, you'll have to use your own library. Instead, I set -Gt 10, which would then put all the init'd data >10 bytes into unique segements without negating the usefullness of the library. This works quite well - thanks Rahul! - Tim Iverson iverson@cory.Berkeley.EDU ucbvax!cory!iverson