The best way probably is having just small startup code in the program which checks if stack is large enough and if not, allocate large enough and then start with it. Works starting at OS1.x.
Also there are compilers which not only check if the stack is large enough, but expand it on the fly, as well.
I think the $STACK is a new nice addition which is esp. useful on modern AmigaOS invocations. If that's your audience, go for it! But if you also target 1.x/2.x/3.0/3.1 you should allocate the stack yourself or inform the user to use the stack cmd.
EDIT: Are the any precautions about ambigious usage of $STACK, e.g. if it's an unlucky coincidence of characters from older software?
|