CBW              Convert Byte to Word                Flags: not altered


Logic:    if (AL < 80h) then
AH   0
AH   FFh

CBW extends the sign bit of the AL register into the AH register. This
instruction extends a signed byte value into the equivalent signed
word value.

Operands                  Clocks   Transfers  Bytes   Example
no operands                 2          -        1     CBW

Note:          This instruction will set AH to 0FFh if the sign bit
(bit 7) of AL is set; if bit 7 of AL is not set, AH
will be set to 0. The instruction is useful for
generating a word from a byte prior to performing
byte division.

See also: CWD
See also: DIV
See also: IDIV

CBW Convert Byte to Word