Define separate subroutine that clears all the bits of the register AL, if the
least significant bit and the most significant bit of AL are both 0. Otherwise,
all the bits of AL are set to 1.
SHL BL,1
JC OVER
AND AL, 11111111B
MOV BLAL
AND AL,00000000B
JNC OVER
SHR BL,1
MULTIPLY:
SHL AL,1
OVER:
OR AL, 11111111B
NEXT:
SHL BL,2
MOV AL, BL
JMP NEXT
MOV BL,AL
RET
OR AL,00000000B