title: assembler pointer address - how does it gets it
body: <p>I have a big missunderstanding regarding pointers at the assembler level. I know that to get an address of a pointer (variable) u use </p>
  
  <pre><code>MOV EAX, variable
  or 
  LEA EAX, variable
  </code></pre>
  
  <p>and i also know that are many different OP codes for MOV but the one i amm interested is <code>MOV register, address</code>.</p>
  
  <p>The question is ... how does it know at what address is the variable located ? Does the assembler make already <code>MOV EAX, address_of_variable</code> in the executable or the instruction is <code>MOV EAX, ...</code> and it finds that value and then get it's address. But how does it know how to search memory for that value and then return the address (supposing address change every time or so).</p>
  
  <p>If this is a stupid question please forgive me , but i can't understand how does it do it. </p>