如题,如何获取PC寄存器的值?
在CCS进行在线Debug时,可以查看PC寄存器的值,如何在代码中获取PC的值呢?

This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
__get_XT:
PUSH XT ;; push the XT value onto the stack
POP ACC ;; pop the value into ACC to return to the calling function
LRETR
__get_P:
PUSH P ;; push the P value onto the stack
POP ACC ;; pop the value into ACC to return to the calling function
LRETR
__get_ACC:
LRETR ;; return ACC to the calling function
可以尝试下上面的代码。