BSF - Bit Scan Forward
0F BC BSF r16,r/m16 Bit scan forward on r/m16
0F BC BSF r32,r/m32 Bit scan forward on r/m32
Description
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 contents source operand are 0, the contents of the destination operand is undefined.
Operands Bytes Clocks
r16, r16 3 6-34 NP
r32, r32 3 6-42 NP
r16, m16 3+d(0,1,2) 6-35 NP
r32, m32 3+d(0,1,2,4) 6-43 NP
Flags
The ZF flag is set to 1 if all the source operand is 0; otherwise, the ZF flag is cleared. The CF, OF, SF, AF, and PF, flags are undefined.
Created with the Personal Edition of HelpNDoc: Easily create Help documents