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

Compiler internal variables

Hello all,

In my application I need to access to the value that Stack is initialized, in general C51 does it in the startup code:

MOV SP,#?STACK-1

What I need is to be able to use later on in my code the value "?STACK-1" and copy it to other variable.

Thanks for your help in advance!
Alfredo M.

Parents
  • "the stack is changed after initialization ... to something else depending of the number of variables that we have in our project"

    Err, no!

    The stack has nothing to do with the number of variables in your project!

    If you don't understand this, you are probably far better off leaving the Stack Pointer alone!

    If you mess with the SP without a thorough understanding of precisely what it's doing, you are almost certain to really mess-up your application Big Time!!

    What exactly is it that you are trying to achieve here?

Reply
  • "the stack is changed after initialization ... to something else depending of the number of variables that we have in our project"

    Err, no!

    The stack has nothing to do with the number of variables in your project!

    If you don't understand this, you are probably far better off leaving the Stack Pointer alone!

    If you mess with the SP without a thorough understanding of precisely what it's doing, you are almost certain to really mess-up your application Big Time!!

    What exactly is it that you are trying to achieve here?

Children
No data