RE: [cc65] Using the hardware stack

From: Dan <opendtv1yahoo.com>
Date: 2007-06-28 15:28:52
--- Christian Krüger <Christian.Krueger@pace.de>
wrote:

> > In fact, you would probably want to make the stack
> word-aligned and use
> > 512 bytes. Or longword-aligned and 1024, or...
> 
> Why? Since there is no misalignment in the 6502
> world this should not
> be an issue. 

Because you can get a stack larger than 256 bytes that
way. Some of the extra stack space would be wasted
because, as you say, the 6502 has no alignment
requirement.

> > It has some merit, but overall I prefer the static
> approach 
> > for speed and simplicity.
> 
> The proposed solution is a compromise between your
> 'radical' approach
> and the exisiting world.

Actually my approach is very conservative. cc65
already supported static locals (of course all C
compilers support static locals if you declare them
"static"), just not parameters. And I haven't changed
the (externally visible) calling convention, nor
modified the "guts" of the compiler, nor made any
changes to the runtime library. The C stack is still
available, and you can freely mix in reentrant
functions.

Dan



       
____________________________________________________________________________________
Get the Yahoo! toolbar and be alerted to new email wherever you're surfing.
http://new.toolbar.yahoo.com/toolbar/features/mail/index.php
----------------------------------------------------------------------
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 Jun 28 15:29:01 2007

This archive was generated by hypermail 2.1.8 : 2007-06-28 15:29:04 CEST