You are here : assembly8086CWD

CWD - 8086

Converts word to double word.

If High bit of AX=1 then : DX = 65535 (0FFFFh)

else : DX = 0


Syntax

CWD


Example

MOV DX, 0   ; DX = 0
MOV AX, 0   ; AX = 0
MOV AX, -5  ; DX AX = 00000h:0FFFBh
CWD         ; DX AX = 0FFFFh:0FFFBh
RET


Output / Return Value


Limitations


Alternatives / See Also


Reference