We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I want to store the value of Program Counter(pc) to a memory location.
I did this,
LDR R1, =[0x20000000]
STR R15, [R1,#0]
I got an error saying, "Error: r15(pc) not allowed here -- `str R15,[R1,#0]'.
How should I get over this error?
Is there any way change the thumb mode?
You can change processor operating state by using special instructions, for example, ARM state and Thumb state using the BX and BLX instructions (ARMv7). T-bit in Program Status Register corresponds for instruction set.