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

stack initislization in 8051

Hi All,
In 8-bit microcontrollers which has upper 128 bytes of internal indirectly addressable RAM, Is stack initilizes from this upper or lower internal RAM address?

Thanks and Regards,
Ashutosh Tiwari

Parents
  • "the answer to your question will be totally different"

    I don't understand why you say that.

    The CPU will always default the stack pointer to 8 on a reset.

    Regardless of whether you write code in C or Assembler, there will always be some startup code (Keil supplied or otherwise) that may set the SP to anywhere suitable for the required memory map.

Reply
  • "the answer to your question will be totally different"

    I don't understand why you say that.

    The CPU will always default the stack pointer to 8 on a reset.

    Regardless of whether you write code in C or Assembler, there will always be some startup code (Keil supplied or otherwise) that may set the SP to anywhere suitable for the required memory map.

Children