Re: [cc65] Interrupt <-> C runtime environment

From: marcas <marcas1chello.at>
Date: 2011-07-11 19:11:54
> Greg is not talking about the 256 bytes hardware stack of the processor
> at $100, but the software stack used by cc65 generated code for passing
> arguments and storing local variables.

Ah OK, thanks.

I do not undestand the code in dbgsupp.s completly yet, so sorry if I am 
asking some further (maybe stupid) questions that are maybe included in 
dbgsupp.s:

Why does cc65 need an own argument stack? Are 256 bytes not enough?
What is the base address of the software stack?
What is the address of the stack pointer (or index counter) for the 
software stack?
What is the maximum size of the software stack?
Only if the stack parameters are flexible: is there a instrinsic C 
header file  with definitions to access this software stack?


> 2. Interrupts can happen in-between changes to the two bytes of the
> Stack-Pointer -- the SP will be "indeterminate".  Therefore, your
> interrupt functions must create their own stack. [Greg]
>

If interrupting the software stack methods is not save (as mentioned by 
Greg), why are the access methods for the stack not "interrupt save" 
(sei,cli)?

Kind regards marcas
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Jul 11 19:12:08 2011

This archive was generated by hypermail 2.1.8 : 2011-07-11 19:12:11 CEST