|
|||||||||||
|
Technical Support On-Line Manuals Assembler User Guide |
Assembler User GuideProgram Counter
The Program Counter (PC) is accessed as PC (or R15). It is incremented by the size of the instruction executed (which is always four bytes in ARM state). Branch instructions load the destination address into PC. You can also load the PC directly using data operation instructions. For example, to branch to the address in a general purpose register, use:
MOV PC,R0
During execution, PC does not contain the address of the currently executing instruction. The address of the currently executing instruction is typically PC-8 for ARM, or PC-4 for Thumb. NoteWriting to the PC directly is not the recommended method for
jumping to an address or returning from a function. Use the
| ||||||||||
|
|||||||||||