BSF DX, AX              ; Bit scan forward. Searches the source operand (from left to right) 
                        ; for the first set bit (1 bit) and store its index in destination register

BSR DX, AX              ; Bit scan reverse. Searches the source operand (from right to left) 
                        ; for the first set bit (1 bit) and store its index in destination register
