Assembly Language Help (alang.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
BSF/BSR Instruction
◄Summary► ◄Key► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
00001111 10111100 mod,reg,r/m disp (0, 1, 2, or 4)
───────────────────┬─────────────────────────┬──────────────────────────────
BSF reg16,reg16 │ bsf cx,bx │ 88/86 ──
BSF reg32,reg32 │ │ 286 ──
│ │ 386 10+3n
│ │ 486 6-42*
───────────────────┼─────────────────────────┼──────────────────────────────
BSF reg16,mem16 │ bsf ecx,bitmask │ 88/86 ──
BSF reg32,mem32 │ │ 286 ──
│ │ 386 10+3n
│ │ 486 7-43
───────────────────┴─────────────────────────┴──────────────────────────────
00001111 10111101 mod,reg,r/m disp (0, 1, 2, or 4)
───────────────────┬─────────────────────────┬──────────────────────────────
BSR reg16,reg16 │ bsr cx,dx │ 88/86 ──
BSR reg32,reg32 │ │ 286 ──
│ │ 386 10+3n
│ │ 486 103-3n#
───────────────────┼─────────────────────────┼──────────────────────────────
BSR reg16,mem16 │ bsr eax,bitmask │ 88/86 ──
BSR reg32,mem32 │ │ 286 ──
│ │ 386 10+3n
│ │ 486 104-3n#
───────────────────┴─────────────────────────┴──────────────────────────────
* Clocks = 8 +
4 for each byte scanned +
3 for each nibble scanned in last byte +
3 for each bit scanned in last nibble
or 6 if second operand equals 0
Same as footnote above, but add 1 clock.
n = Bit position from 0 to 31
Clocks = 6 if second operand equals 0
# n = Bit position from 0 to 31
Clocks = 7 if second operand equals 0
-♦-