|
|||||||||||
|
Technical Support Support Resources
Product Information |
C51: Creating a Fixed Stack SegmentInformation in this article applies to:
QUESTIONIs it possible to define a fixed stack location for the 8051's hardware stack? ANSWERYes. The easiest way to do this is to modify the STARTUP code so the stack is an absolute segment at a fixed location. For example: In the STARTUP code, change the following:
to:
This creates an absolute segment for the stack. Then, you can change the 0xA0 to the address where you want the stack to reside. This has the advantage that if your C program variables overlap with the stack, the linker emits a warning. 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.