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