🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #413

Re: How to modify _stklen in Turbo C 2.0

#413
From: Steve Resnick
Date: Mon, 07 May 1990 18:06
26 lines
1857 bytes
In article <1990May6.195629.6368@cs.umn.edu> swie@cs.umn.edu (S. T. Tan) writes:
>Could anybody tell me how to modify the stack size in Turbo C 2.0 ?
>I get an error message "Stack Overflow!" when I run my program (NON-recursive).
>

One of the things I dislike about the Turbo C runtime is that the stack is not
allocated based on the .EXE header. Instead, the variable _stklen is used to
determine the stack length. In one (only one) of your source files put a line

unsigned _stklen = <stack size in bytes> ;

This will cause a duplicate symbol warning by the linker but your new symbol 
takes precedence. BTW - This is buried somewhere in the TC manual. :)

Hope this helps...

--------------------------------------------------------------------------------
Steve Resnick -<stever@octopus.COM apple!octopus!stever sun!vsi1!octopus!stever>
408/241-1533 Process Scientific, Inc.
--------------------------------------------------------------------------------
"0x2B|~0x2B THAT is the question!"
My views are my own and in no way represent the views of
Octopus Enterprises or Process Scientific, Inc.
--------------------------------------------------------------------------------
Flames, Grammar, and SPELLING errors etc: >/dev/null
--------------------------------------------------------------------------------
Technical Details
Message-ID: <1990May7.180645.12074@Octopus.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ames!vsi1!octopus!stever
References: <1990May6.195629.6368@cs.umn.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ames!vsi1!octopus!stever
From: stever@Octopus.COM (Steve Resnick )
Newsgroups: comp.sys.ibm.pc.programmer
Subject: Re: How to modify _stklen in Turbo C 2.0
Message-ID: <1990May7.180645.12074@Octopus.COM>
Date: 7 May 90 18:06:45 GMT
References: <1990May6.195629.6368@cs.umn.edu>
Reply-To: stever@octopus.UUCP (Steve Resnick )
Distribution: usa
Organization: Octopus Enterprises, Cupertino CA
Lines: 27