Scans source operand for first bit set. Sets ZF if a bit is found set and loads the destination with an index to first set bit. Clears ZF is no bits are found set. BSF scans forward across bit pattern (0-n) while BSR scans in reverse (n-0).
Usage:
BSF dest,src
Modifies flags:
ZF
Clocks | Size | |||||
---|---|---|---|---|---|---|
Operands | 808x | 286 | 386 | 486 | Bytes | |
reg,reg | - | - | 10+3n | 6-42 | 3 | |
reg,mem | - | - | 10+3n | 7-43 | 3-7 | |
reg32,reg32 | - | - | 10+3n | 6-42 | 3-7 | |
reg32,mem32 | - | - | 10+3n | 7-43 | 3-7 |