title: Using ".intel_syntax noprefix" how can I get memory address of a label?
body: <p>I'm learning how to create real mode programs assembled and linked with:</p>
  
  <ul>
  <li>GCC Assembler version 2.25 </li>
  <li>Binutils version 2.25 </li>
  <li>GCC version 5.2.0</li>
  </ul>
  
  <p>I use Intel syntax without prefixes specified with <code>.intel_syntax noprefix</code></p>
  
  <p>I want to load the address of a string into the <em>SI</em> register. I know, how to refer to a memory location in <em>NASM</em>, but when I do the same inside the GNU Assembler code, it only moves a WORD of the string into the register instead of the address of the label. </p>
  
  <p>My code is:</p>
  
  <pre><code>.code16
  .intel_syntax noprefix
  
  mov cx, 11
  mov si, name
  mov di, 0x7E00
  push di
  rep cmpsb
  pop di
  je LOAD
  </code></pre>
  
  <p>When I compile it with GCC, I can see in the debugger that the processor does:</p>
  
  <pre><code>mov si, WORD ptr ds:0x7d2d
  </code></pre>
  
  <p>but I want the address of the string moved into the register, not the data it points at.</p>
  
  <p>I also tried to put square brackets around the name like this:</p>
  
  <pre><code>.code16
  .intel_syntax noprefix
  
  mov cx, 11
  mov si, [name]
  mov di, 0x7E00
  push di
  rep cmpsb
  pop di
  je LOAD
  </code></pre>
  
  <p>It doesn't make a difference.</p>
  
  <p>From <em>NASM</em> I know that this assembly code works:</p>
  
  <pre><code>mov si, name
  </code></pre>
  
  <p><em>NASM</em> will generate the instruction that moves the address of <code>name</code> into register <em>SI</em>.</p>
  
  <p>My question: Is there a way to force <em>GCC</em> using Intel Syntax with No Prefix to load the address of a symbol into a register?</p>