将ax寄存器中的有符号数扩展为dx:ax中的有符号数。如果ax是正数,则dx会被设置为00000000h;如果ax是负数,则dx会被设置为FFFFFFFFH
.386 .model flat,stdcall option casemap:none .stack 4096 Include Irvine32.inc includelib Irvine32.lib ExitProcess PROTO,dwExitCode:DWORD .data packed_1 WORD 4536h packed_2 WORD 7207h sum DWORD ? .code main PROC mov ax,-5 ;dx=xxh ax=FFFBh CWD ;DX = FFFFh AX = FFFBh INVOKE ExitProcess,0 main ENDP END main
标签:汇编,符号,双字,dx,ax,main,CWD From: https://www.cnblogs.com/liming19680104/p/17937441