
ARMTHE WORLD’S MOST POPULAR 32BIT EMBEDDED PROCESSOR 387
e main program has a procedure named PROC1 which is called by the
instruction BL PROC1. is instruction causes the current PC value to be copied to
LR. In PROC1, since we anticipate a nested procedure, we push LR and the working
registers to stack using the instruction STMDB SP!,{REGS,LR}. us the content of
LR is safely stored in the stack.
In the procedure PROC1, another procedure is called by the instruction BL
PROC2. is instruction causes the copying of the present PC to LR. In PROC2, there
is the instruction MOV PC, LR at the end. is will get the PC value back from LR, ...