|ARM Technical Support Knowledge Articles|
Applies to: C51 C Compiler
Information in this article applies to:
My 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?
The 8051 does not have an accessible register for the program counter or instruction pointer.
Use 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.
Article last edited on: 2006-11-15 13:08:26
Did you find this article helpful? Yes No
How can we improve this article?