title: TASM; LOCAL and LOCALS directives
body: <p>I am writing a program on assembler using TASM 4.1 and I have stumbled upon a problem I have been unable to fix for 2 days.
  The problem is that TASM just won't recognize labels in macro as local labels and would give me an error when assembling (Symbol already defined elsewhere). So far I have tried the following things:</p>
  
  <ol>
  <li>Putting LOCALS at the very beginning of .asm file and using @@ for local labels (as was suggested in one of the answers to a similar problem). Produced zero effect whatsoever.</li>
  <li>Using LOCAL inside a macro to list all my local labels starting with @@ (again, as was suggested on the web). However, this produced even more errors when assembling: "Symbol already different kind" and "Expecting pointer type"</li>
  <li>Putting LOCALS @@ at the beginning of macro. Just like with the first case, zero effect.</li>
  <li>Putting LOCALS at the beginning of .asm file and listing labels using LOCAL. Same effect as with #2.</li>
  <li>Putting LOCALS at the beginning of .asm file and using LOCALS @@ inside macro. No effect.</li>
  <li>Putting LOCALS @@ at the beginning of .asm file. No effect.</li>
  </ol>
  
  <p>This is my very first time trying to program, so I apologize if I missed some trivial thing that causes this problem. Here is the macro that I have troubles using more than once:</p>
  
  <pre><code>dot_connect_oct1 macro dot1_x, dot1_y, dot2_x, dot2_y, colour
  
          ;;code
  
      @@check_1:
          ;;code
          jz @@exit_1
  
          ;;code
          jg @@draw_1_2
  
      @@draw_1_1:
          ;;code
          jmp @@check_1
  
      @@draw_1_2:
          ;;code
          jmp @@check_1
  
      @@exit_1:
  endm
  </code></pre>
  
  <p>Update:</p>
  
  <p>Alright, I seem to have found the solution. What worked for me was declaring LABELS at the beginning of .asm file and using LOCAL in the macro itself for each label like this:</p>
  
  <pre><code>LOCAL @@label1
  LOCAL @@label2
  LOCAL @@label3
  ...
  </code></pre>
  
  <p>Listing them in one line (LOCAL @@label1, @@label2, @@label3, ...) does not work.</p>
  
  <p>Maybe someone will find this useful.</p>