I was wondering how I could POP a variable off the stack and store it in a register.
For example:
asm(" MOV R5, #10");
asm ("MOV R6, #20");
asm("PUSH {R5,R6}");
I now want to POP the variables off the stack and store the value of R6 in R5 and vica versa.
I have searched the ARM site (http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0204j/Babefbce.html) but I can't find a valuable answer.
I hope someone could help me.
EDIT:
I figured this would do the job:
asm("MOV R5, #10");
asm("MOV R6, #20");
asm("PUSH {R5,R6}");
asm("POP {R5,R6}");
But the registers do not change according to my debugger.