汇编2x+y,结果存进W中

来源:百度知道 编辑:UC知道 时间:2024/05/30 09:19:42
麻烦高手帮解下,谢谢了

; 本程序在MASMPlus 1.2集成环境下通过编译,经过调试,运行正确。
Code Segment
Assume CS:Code,DS:Code
x db 56
y db 78
w db ?
Press_Key db 7,13,10,13,10,'The complated. Press any key to exit...$'
Start: push cs
pop ds
mov al,x
shl al,1 ;乘2
add al,y
mov w,al
; -------------------------------------
Exit_Proc: lea dx,Press_Key ;提示操作完成,按任意键结束程序
mov ah,9
int 21h
mov ah,1
int 21h
mov ah,4ch ;结束程序
int 21h
Code ENDS
END Start ;编译到此结束