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
  • hi,
    I want to use a "jmp". ...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!

    Sorry? Why not simple:

    ; main stream
    ; ....
    JMP MY_TASK ; go to your "subroutine"
    L_CONTINUE:
    ; contunue main stream
    
    MY_TASK:
    ; your piece of code
    JMP L_CONTINUE ; return to main stream
    

    Regards,
    Oleg

Reply
  • hi,
    I want to use a "jmp". ...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!

    Sorry? Why not simple:

    ; main stream
    ; ....
    JMP MY_TASK ; go to your "subroutine"
    L_CONTINUE:
    ; contunue main stream
    
    MY_TASK:
    ; your piece of code
    JMP L_CONTINUE ; return to main stream
    

    Regards,
    Oleg

Children
No data