CWD              Convert Word to Doubleword          Flags: not altered

CWD

Logic:    if (AX < 8000h) then
DX   0
else
DX   FFFFh

CWD extends the sign bit of the AX register into the DX register. This
instruction generates the double-word equivalent of the signed number
in the AX register.

                                                                          
Operands                  Clocks   Transfers  Bytes   Example
no operands                 5          -        1     CWD
                                                                          

Note:          This instruction will set DX to 0FFFFh if the sign
bit (bit 15) of AX is set; if bit 15 of AX is not
set, DX will be set to 0.

See also: CBW
See also: DIV
See also: IDIV

CWD Convert Word to Doubleword