title: GNU AS confusion between memory and immediate depending on declaration order?
body: <p>I've searched the web but haven't found anything that answers my question so hopefully someone on here will be able to answer it.</p>
  <p>Using GNU AS with Intel syntax (<code>.intel_syntax noprefix</code>) gives mixed results.
  Using:</p>
  <pre><code>mov ax, variable
  
  variable = 5
  </code></pre>
  <p>Compiles as mov ax, [5], whereas</p>
  <pre><code>variable = 5
  
  mov ax, variable
  </code></pre>
  <p>Compiles as mov ax, 5.</p>
  <p>Does anyone know why defining the variable after its referenced makes it a memory offset rather than a constant value?</p>