[comp.os.msdos.programmer] Turbo C stack

weston@ucselx.sdsu.edu (weston t) (07/21/90)

changing default stack size in turbo 1.5:

 i use turbo 2.0, but i'm assuming it is the same. _stklen is defined
in a module in the appropriate library (cs.lib??) called STKLEN. to
change it i just patched the constant, which in the large model is 
4k (1000 hex, written 0010 in a hex dump). for my large model, i just
changed 0010 to 0020 (8k decimal) with norton's hex editor. you ought
to be able to avoid patching by writing a C program that does nothing
by define stklen (no underline) to be what you want. in either case, you need
to write the name of your compiled or patched STKLEN.obj on the linker
line after the initialization code c0?.obj but before any reference
to the c library (cs/lib or whatever it is). i forgot to mention that
if you want to patch the STKLEN module, you will need to extract it
from the library with the tlib utility.

good luck

weston

weston@ucselx.sdsu.com

einari@rhi.hi.is (Einar Indridason) (07/22/90)

In article <1990Jul20.171212.6970@ucselx.sdsu.edu> weston@ucselx.sdsu.edu (weston t) writes:
>changing default stack size in turbo 1.5:
>
> i use turbo 2.0, but i'm assuming it is the same. _stklen is defined
>in a module in the appropriate library (cs.lib??) called STKLEN. to
>change it i just patched the constant, which in the large model is 
>4k (1000 hex, written 0010 in a hex dump). for my large model, i just
>changed 0010 to 0020 (8k decimal) with norton's hex editor. you ought

Much simpler way to do that:

...
extern unsigned _stklen = <DESIRED SIZE OF STACK>

main()
{
....
}

--
I just learned a new curse: "You #$@! son of SCROLLBAR!"

Internet:       einari@rhi.hi.is   | 'Just give me my command line and throw
UUCP: ..!mcsun!isgate!rhi!einari   | the GUIs in the dust-bin!!!!!!!!!'