| Bit Operations | |||||
| Name | Description | Code | Operation | operands | operand size |
|---|---|---|---|---|---|
| bt | Bit test | bt op1,op2 | CF = s_bit | reg, const mem, const reg, reg mem, reg |
word, byte dword,byte |
| bts | Bit test and set | bts op1,op2 | CF = s_bit, s_bit = 1 | ||
| btr | Bit test and reset | btr op1,op2 | CF = s_bit, s_bit = 0 | ||
| btc | Bit test and complement | btc op1,op2 | CF = s_bit, s_bit = not s_bit | ||
| bsf | Bit scan forward | bsf dest,source | dest=index of first set bit in source (forward:from low to high) | reg, reg reg, mem |
word,word dword,dword |
| bsr | Bit scan reverse | bsr dest,source | dest=index of first set bit in source (reverse:from high to low) | ||