|
|||||||||||
|
Technical Support Support Resources
Product Information |
C51: Reentrant Functions and VariablesInformation in this article applies to:
QUESTIONIn the SMALL memory model (all RAM internal, all code in 8K), do reentrant functions use the push and pop instructions to put variables on the stack or do they overlay variables? ANSWERThe reentrant stack is simulated using R0 and R1. Variables are "pushed" and "popped" using the MOV @R0/R1 instructions. The hardware stack is not used for these variables. When you use the reentrant stack in internal memory, the hardware stack (accessed with SP) starts at the bottom of memory and grows up. The simulated reentrant stack starts at the top of memory (255) and grows down. You may use a debugger watch and test for the collision of these two stacks. SEE ALSO
Last Reviewed: Thursday, February 25, 2021 | ||||||||||
|
|||||||||||
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.