|
|||||||||||
|
Technical Support Support Resources
Product Information |
C51: Updating the Program Counter on the StackInformation in this article applies to:
SYMPTOMSMy project needs to update the program counter during an ISR to "return" to a different function than it interrupted. How can I know the location of a function to implement this in C? CAUSEThe 8051 does not have an accessible register for the program counter or instruction pointer. RESOLUTIONUse a pointer to any function you'll be "calling" in this manner. Using indirection, you can receive the address of the function, regardless of where it ultimately ends up being located by the linker. MORE INFORMATION
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.