CWD
CONVERT WORD
TO
DOUBLEWORD
Operation:
if
(AX) <
8000H
then
(OX)
~
0
else
(OX)
~
FFFFH
Description:
CWD (Convert
Word
to Doubleword) extends
the sign
of
the word in register
AX
throughout
register DX.
CWD
does
not
affect any flags.
CWD can be used to produce a double-length
(doubleword) dividend from a word prior to
performing word division.
Encoding:
1100110011
Flags Affected:
None
CWD
CWD Operands Clocks Transfers Bytes
CWD Coding Example
(no operands)
5
-
1
CWO
2-69