You are here : assembly8086CBW

CBW - 8086

Convert byte into word. Algorithm: If high bit of AL = 1 then: AH = 255 (0FFh) Else : AH = 0


Syntax

CBW


Example

MOV AX, 0	;AH=0 , AL=0
MOV AL, -5	;AX = 000FBh (251)
CBW		;AX = 0FFFBh (-5)
RET


Output / Return Value


Limitations


Alternatives / See Also

8086 CWD (Convert Word to Double) - https://wikidev.in/wiki/assembly/8086/CWD


Reference