title: How to load variable number of memory word to registers in ARM assembly?
body: <p>I want to load multiple memory words to registers using LDM command in ARM assembly like</p>
  
  <pre><code> LDMFA    r9!, {r0-r5}  ; 
  </code></pre>
  
  <p>where r9 has the address of starting memory byte to be loaded and 6 memory words are loaded to registers from r0 to r5. How can I modify this instruction so as to load a variable number of memory words? It should support loading of 1 to 12 memory words to a set of registers.</p>
  
  <p>I am trying to implement copying of values from one memory location to another. User can give source start address destination start address and the number of bytes to be copied.</p>