Command: BSF - Bit Scan
Arguments: DEST: register (16 or 32 bit); SRC = register/memory (16 or 32 bit)
Usage: BSF DEST,SRC
Effects: BSF searches for the least significant set bit in its source (second) operand, and if it finds one, stores the index in its destination (first) operand. If no set bit is found, the contents of the destination operand are undefined. If the source operand is zero, the zero flag is set.
Flags to be set: ZF=1 if SRC = 0