RosettaCodeData/Task/Stack/ARM-Assembly/stack-1.arm
2023-07-01 13:44:08 -04:00

3 lines
289 B
Text

STMFD sp!,{r0-r12,lr} ;push r0 thru r12 and the link register
LDMFD sp!,{r0-r12,pc} ;pop r0 thru r12, and the value that was in the link register is put into the program counter.
;This acts as a pop and return command all-in-one. (Most programs use bx lr to return.)