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

How can I read out the PC?

Hi all!

I need to read out the actuall value of the program counter (PC). How can I do that?
I use the Keil uVision environment with an 8051 based controller!

Thanks for your help!

Parents
  • I am not allowed to use a "call" function because I am not allowed to alter the stack pointer (SP). Instead of using the "call" command I want to use a "jmp". Before I perform the jump command I need to have the return address from the program counter, so that I can return back to the source of the jump command. That is like I would use a call function, but without altering the SP!

Reply
  • I am not allowed to use a "call" function because I am not allowed to alter the stack pointer (SP). Instead of using the "call" command I want to use a "jmp". Before I perform the jump command I need to have the return address from the program counter, so that I can return back to the source of the jump command. That is like I would use a call function, but without altering the SP!

Children