CBW Convert Byte to Word Flags: not altered
CBW
Logic: if (AL < 80h) then
AH 0
else
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.
Seealso:
This page last updated on Fri Nov 30 10:49:50 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster