This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can you specify using the stack for local variable

I am using a Cygnal 8051 processor with the Keil compiler. Is there a way to tell the compiler to use the stack for local variables in functions instead of using dedicated memory location ?
Thank you for help.
Charles

Parents
  • Local variables in the keil (and other) dedicated '51 compilers are saved based on a 'call tree'. In other words, teo functions that can not be called at the same time will have the local variables in the same place. This uses no more memory than saving on the stack and is sooooo much more efficient with the '51 architecture.

    Erik

Reply
  • Local variables in the keil (and other) dedicated '51 compilers are saved based on a 'call tree'. In other words, teo functions that can not be called at the same time will have the local variables in the same place. This uses no more memory than saving on the stack and is sooooo much more efficient with the '51 architecture.

    Erik

Children
No data