|
|||||||||||
Technical Support Support Resources
Product Information |
A51: Reading the Program CounterInformation in this article applies to:
QUESTIONHow can I get the address currently in the program counter? ANSWERThe 8051 has no direct way to read the program counter. However, there are several tricks you can use to get the contents of the program counter. Note that the address in the program counter is a 16-bit value. And, the program counter changes while executing code to get its address. Method 1
At this point, DPTR contains the address of the MOV DPTR instruction. Method 2
At this point, DPTR contains the address of the here label. MORE INFORMATIONLast 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.