title: Inline asm in c++ in vs __asm
body: <pre><code>char name[25];
  int generated_int;
  
  for(int i = 0; i&lt;sizeof(name); i++)
  {
      name[i] = (char)0;
  }
  
  cout &lt;&lt; "Name: ";
  cin &gt;&gt; name;
  
  int nameLen = strlen(name);
  
  __asm
  {
      pusha;
  
      mov esi, &amp;name //I got error here, I cant use "&amp;". How to move name address to esi?
      mov ecx, nameLen
      mov ebx, 45
  
  start:
      mov al, [esi]
      and eax, 0xFF
      mul ebx
      inc esi
      add edi, eax
      inc ebx
      dec ecx
      jnz start
  
      mov generated_serial, edi
  
      popa
  }
  
  
  
  cout &lt;&lt; endl &lt;&lt; "Serial: " &lt;&lt; generated_serial &lt;&lt; endl &lt;&lt; endl;
  </code></pre>
  
  <p>I don't know how to get address of my chay array in asm block.
  When I try to use "&amp;" e.g. &amp;name i get error while compiling:</p>
  
  <pre><code>error C2400: inline assembler syntax error in 'second operand'; found 'AND'
  </code></pre>
  
  <p>UPDATE:</p>
  
  <p>mov esi, name gives me this compile error: C2443: operand size conflict</p>
  
  <p>UPDATE 2:
  lea is working fine.</p>