Re: [cc65] Using the hardware stack

From: Johan Kotlinski <kotlinski1gmail.com>
Date: 2007-06-28 13:20:53
A minor benefit of having a 256 byte stack would also be, if there is
some random recursive error and the stack grows forever, it wouldn't
overwrite all RAM. It would still crash, but at least it would be
possible to do data recovery afterwards.

Johan

On 6/28/07, Christian Krüger <Christian.Krueger@pace.de> wrote:
>
> Hi Dan,
> > ... This is much faster and
> > often smaller than using the C stack. Since the default
> > maximum usage is only 6 bytes per function, this is unlikely
> > to cause stack overflow issues.
>
> an optimization I was thinking about some time ago, was an
> alternative C stack model were the additional stack is limited
> to 256 bytes and Y is the stack pointer.
>
> The 256 bytes would be enough for many projects and this
> feature could also reduce the size of the code and increase
> speed. But since many functions of the runtime package have to
> be rewritten I rescheduled further estimations into the future.
> I though about macro functions in two flavors: One set for the
> classic stack and one set for the 'quick'-stack. Stack pushing and
> poping would be done by using one specific set of macros which
> could by choosed project dependent (user setting). And the runtime
> parts would supplied in both forms (each assembled with the specific
> macro set)...
>
> What do you think about this proposal?
>
> chrisker
>
>
>
>
>
>
>
>
> ----------------------------------------------------------------------
> To unsubscribe from the list send mail to majordomo@musoftware.de with
> the string "unsubscribe cc65" in the body(!) of the mail.
>


-- 
http://www.rebelpetset.com
http://www.littlesounddj.com
N‹§²æìr¸›yúèšØ^–+-±éÝ™¨¥¶‰šŽŠÝ¢j&ºÊ·«y×°¶¬¶¸§‚éì¹»®&ÞqιŠ{ayºʇí…éš
Received on Thu Jun 28 13:21:04 2007

This archive was generated by hypermail 2.1.8 : 2007-06-28 13:21:06 CEST