title: Can't pass label to ARM macro?
body: <p>Here's my macro:</p>
  
  <pre><code>        ; Good old DJNZ meets ARM!
  
          MACRO
          DJNZ  $register, $target
              SUBS    $register, $register, #1
              BNE     $target
          MEND
  </code></pre>
  
  <p>And my usage:</p>
  
  <pre><code>DELAY       PROC
                  PUSH    {R2, LR}                   ; Push the changed registers &amp; link register
  
  WAIT_OUTER      LDR     R2, =40000                 ; Length of inner loop
  
  WAIT_INNER      DJNZ    R2, WAIT_INNER
                  DJNZ    R0, WAIT_OUTER
  
                  POP     {R2, PC}                   ; Pop &amp; return
              ENDP
  </code></pre>
  
  <p>I'm getting this error:</p>
  
  <pre>
  == Compiling main.asm to main.o ==
  "main.asm", line 167 (column 9): Error: A1516E: Bad symbol 'WAIT_INNER', not defined or external
      at line 167 in macro DJNZ in 'macros.s'
  
    167 000000d0    BNE  WAIT_INNER
                         ^
  1 Error, 0 Warnings
  make: *** [main.o] Error 1
  </pre>
  
  <p>Ideas what's wrong? According to the manual, passing labels into macros should work.</p>