用汇编语言编程问题...

编程实现个位不进位的加法,要求有输入输出.
如输入:4、5输出:9。

尽快回复!!

程序已经调试通过。
cseg segment
assume cs:cseg
begin: mov ah,1
int 21h;读入第一个数
and al,0fh;转换为数值
mov dl,al;放dl暂存
mov ah,1
int 21h;读入第二个数
and al,0fh;转换为数值
add dl,al;两个数相加
or dl,30h;转换成相应的ASCII码
mov ah,2
int 21h;用2号dos功能调用输出结果
mov ah,4ch
int 21h;程序结束
cseg ends
end begin
温馨提示:答案为网友推荐,仅供参考
相似回答