title: Why does `lea esi, dword [edx + ecx * 4]` produce an error when assembled using NASM?
body: <p>Why does <code>lea esi, dword [edx + ecx * 4]</code> produce an error when assembled using NASM?</p>
  
  <p>I get the error:</p>
  
  <blockquote>
    <p>insertion_sort.asm:19: error: mismatch in operand sizes</p>
  </blockquote>
  
  <p>However, the purpose of <code>lea</code> is just to load the address of <code>dword [edx + ecx * 4]</code>, so even thus the reference is for a DWORD value it should not matter?</p>
  
  <p>On the other hand,  </p>
  
  <pre><code>mov eax, dword [edi] 
  </code></pre>
  
  <p>works perfectly fine as expected. Here I declare that <code>[edi]</code> references a DWORD value.</p>