AND  R0, R0, #0   ;   clear out R0
          STR  R0, R6, #3   ;   x = 0;

          ; while (x < 10)

          ; test
LOOP:     LDR  R0, R6, #3   ;   perform the test
          ADD  R0, R0, #-10
          BRpz DONE         ;   x is not less than 10

          ; loop body
          LDR  R0, R6, #3   ;   get x
          :
          <code for calling the function printf>
          :
          ADD  R0, R0, #1   ;   x + 1
          STR  R0, R6, #3   ;   x = x + 1;
          BR   LOOP         ;   another iteration?

DONE:     :
          :