title: What is the size of each asm instruction?
body: <p>What is the size of each asm instruction? Every instruction takes how many bytes? 8 bytes? Four for the opcode and Four for the argument? What happens when you have one opcode and 2 arguments, in mov, for example? Do they have a fixed size in memory or do they vary? Does EIP have anything to do with this, of its value is always incremented by one, being totally independent of what kind of instruction it is passing by?</p>
  
  <p>I ask this as when I was reading <a href="http://en.wikibooks.org/wiki/X86_Disassembly/Functions_and_Stack_Frames" rel="noreferrer">http://en.wikibooks.org/wiki/X86_Disassembly/Functions_and_Stack_Frames</a> , I stumbled across the fact that it seems a call instruction is equivalent to a push and jmp instruction.</p>
  
  <pre><code>call MYFUNCTION
  mov my_var, eax
  </code></pre>
  
  <p>being the same as</p>
  
  <pre><code>push [eip + 2];
  jmp MYFUNCTION;
  mov my_var, eax
  </code></pre>
  
  <p>When we're pushing [eip + 2] on the stack, to what value are we pointing then? To the line right next to "jmp MYFUNCTION", mov my_var eax, right?</p>
  
  <p>ps: MSVC++ flags an error on the first line, as it says eip is undefined. It works for eax, esp, ebp, etc. What am I doing wrong?</p>