title: BSF Opcode is not working
body: <p>I am using Visual Studio 2010 professional, and I just checked in debug mode that BSF is not working I tried a lot of combinations, none of them worked!</p>
  
  <pre><code>__asm
  {   
      mov ebx, 0ffffffh;
      bsf ecx, ebx;
  };
  </code></pre>
  
  <p>the code above at least give me some results but I got 0 on ecx register (I'm using 64-bit win7 and application is 32-bit)</p>
  
  <p>Here's what Intel says about BSF:</p>
  
  <blockquote>
    <p>Searches the source operand (second
    operand) for the least significant set
    bit (1 bit). If a least significant 1
    bit is found, its bit index is stored
    in the destination operand (first
    operand). The source operand can be a
    register or a memory location; the
    destination operand is a register. The
    bit index is an unsigned offset from
    bit 0 of the source operand. If the
    content of the source operand is 0,
    the content of the destination operand
    is undefined.</p>
  </blockquote>
  
  <p>Anybody has any thoughts? Thank you all...</p>