[cc65] STACKSIZE - What's the right size?

From: steve-cc65 <steve-cc651arcadehacking.com>
Date: 2009-02-05 21:39:15
With all this talk about ZP variables it brought up a question I have 
concerning the STACKSIZE symbol in the (platform).cfg.  I have seen 
other "stack" references which are larger than the CPU stack 
($100-$1FF).  For example, the atari.cfg file contains the following:

    SYMBOLS {
        __STACKSIZE__    = $800;        # 2K stack
        __RESERVED_MEMORY__: value = $0, weak = yes;
    }

    MEMORY {
        ZP:      start = $0082, size = $007E, type = rw, define = yes;
        HEADER:  start = $0000, size = $0006, file = %O;
        RAM:     start = %S,    size = $BC20 - __STACKSIZE__ - %S, file 
= %O;
        TRAILER: start = $0000, size = $0006, file = %O;
    }

I'm assuming this is some sort of CC65/C specific stack rather than a 
CPU register jsr/push/pop stack.  If so, what is the right size or 
minimum size I should allocate for this?  If I have simple functions 
that do not pass a lot of parameters can this be much, much smaller?

Please keep in mind that I am dealing with extreme legacy hardware which 
only has about $600 in total usable RAM!

What happens if I do not define the STACKSIZE symbol?
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Feb 5 21:39:25 2009

This archive was generated by hypermail 2.1.8 : 2009-02-05 21:39:26 CET