Stack: Difference between revisions

No edit summary
Line 700:
STACK IS EMPTY
</pre>
 
=={{header|ARM Assembly}}==
The stack is held in register 14, or <code>r14</code> but more commonly referred to as <code>SP</code> for clarity.
 
Pushing and popping multiple values is very similar to [[68000 Assembly]].
<lang ARM Assembly>
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.)</lang>
 
 
=={{header|Arturo}}==
1,489

edits