title: frame pointer register 'ebx' modified by inline assembly code
body: <p>Unfortunately, I had to re-image my laptop to install Visual Studio 2012. My project build but with above warning. Previously I had Visual Studio 2010 and I never got the above warning. The code is as follows:</p>
  
  <pre><code>__asm
  {
      //Initialize pointers on matrices
      mov eax, dword ptr [this]
  
      mov ebx, dword ptr [eax+UPkk] 
      mov dword ptr [UPkk_ptr],ebx
  
      mov ebx, dword ptr [eax+UPk1k] 
      mov dword ptr [UPk1k_ptr],ebx
  
      mov ebx, dword ptr [eax+DPk1k] 
      mov dword ptr [DPk1k_ptr],ebx
  
      mov ebx, dword ptr [eax+DPkk] 
      mov dword ptr [DPkk_ptr],ebx
  
      mov ebx, dword ptr [eax+mat_A] 
      mov dword ptr [mat_A_ptr],ebx
  
      mov ebx, dword ptr [eax+vec_a] 
      mov dword ptr [vec_a_ptr],ebx
  
      mov ebx, dword ptr [eax+vec_b] 
      mov dword ptr [vec_b_ptr],ebx
  }
  </code></pre>
  
  <p>Do I need to change any settings in the project?</p>
  
  <p>Best Regards</p>
  
  <p>Chintan</p>
  
  <p>Edit: In the above code when I replace ebx with ecx, the warnings go away and the code works fine. However, there is another piece of code where I have used ebx and ecx and in that case my program crashes. Here is the code:</p>
  
  <pre><code>__asm
  {
      //Initialize UPk1k[idx_4] pointer
      mov eax, dword ptr [UPk1k_ptr]
      mov ebx, dword ptr [idx_4]
      imul ebx,8
      add eax,ebx
      mov dword ptr [UPk1k_id4_ptr],eax
  
      //Initialize UPkk[idx_4] pointer
      mov eax, dword ptr [UPkk_ptr]
      mov ebx, dword ptr [idx_4]
      imul ebx,8
      add eax,ebx
      mov dword ptr [UPkk_id4_ptr],eax
  
      //Initialize UPk1k[idx_4] pointer
      mov eax, dword ptr [vec_b_ptr]
      mov ebx, dword ptr [idx_1]
      imul ebx,8
      add eax,ebx
      mov dword ptr [vec_b_id1_ptr],eax
  
      mov edi, dword ptr [idx_1] //Load idx_1 in edi
      mov esi, 0 //initialize loop counter
      jmp start_proc11
  
      start_for11:inc esi //idx_2++
  
      start_proc11:cmp esi, edi //idx_2&lt;idx_1 ?
      jge end_for11 //If yes so end of the loop
  
      mov eax, UPk1k_id4_ptr //load UPk1k[idx_4] adress
      mov ebx, vec_b_ptr //load vec_b adress
      mov ecx, esi
      imul ecx,8
      add eax, ecx //UPk1k[idx_4+idx_2] in eax
      add ebx, ecx //vec_b[idx_2] in eax
  
      fld qword ptr [eax]//push UPk1k[idx_4+idx_2]
      fld qword ptr [ebx] //push vec_b[idx_2]
      mov edx,dword ptr [Sd_ptr]
      fmul qword ptr [edx] //vec_b[idx_2]*Sd
      fadd //pop UPk1k[idx_4+idx_2]+vec_b[idx_2]*Sd
      mov edx,dword ptr [UPkk_id4_ptr]
      fstp qword ptr [edx+esi*8] //pop UPkk[idx_4+idx_2]=UPk1k[idx_4+idx_2]+vec_b[idx_2]*Sd
      fld qword ptr [ebx] //push vec_b[idx_2]
      mov edx,dword ptr [vec_b_id1_ptr]
      fld qword ptr [edx] //push vec_b[idx_2]
      fmul qword ptr [eax]
      fadd
      fstp qword ptr [ebx]
      jmp start_for11 //end of the loop
      end_for11:
  }
  </code></pre>
  
  <p>Many Thanks</p>
  
  <p>Best Regards</p>
  
  <p>CS</p>