符号扩展 CBW CWD

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

CBW 字节转换为字:

若 AL 最高有效位为0,则 AH = 0    ;若 AL 最高有效位为1,则 AH = 0FFH  如:

MOV AX,5678H   ;即AH = 56, AL = 78 ,AX = 5678 

CBW            ;AH = 0FFH, AL = 78,AX = 0FF78H



CWD 字节转换为双字:

若 AX 最高有效位为0,则 DX = 0    ;若 AX 最高有效位为1,则 DX = 0FFFFH  如:

MOV AX,5678H  ;AX = 5678H

CWD           ;AX = 5678H,DX = 0

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

 

posted @ 2013-11-22 15:44  yangsan  阅读(1122)  评论(0编辑  收藏  举报