您的位置:首页 > 其它

(汇编复习)从键盘上输入两个一位十进制无符号数字符,并对其做加法,以十进制的形式输出结果

2019-01-10 00:40 369 查看
CODE   SEGMENT
ASSUME  CS:CODE
start:
mov dl,'?'
mov ah,02h
int 21h
mov ah,01h
int 21h
cmp al,'0'
jb  start
cmp al,'9'
ja  start
and al,0fh
mov bl,al
input:
mov al,01h
int 21h
cmp al,'0'
jb  input
cmp al,'9'
ja  input
and al,0fh
xor ah,ah
add al,bl
aaa
add ax,3030h
mov bx,ax
mov dl,bh
mov ah,02h
int 21h
mov dl,bl
mov ah,02h
int 21h
mov ah,4ch
int 21h
code ends
end start

今天不想解释 大家自己看吧

绝不向黑夜请安
老朽请于白日尽头涅槃
咆哮于光之消散
先哲虽败于幽暗
诗歌终不能将苍穹点燃
绝不向黑夜请安
贤者舞蹈于碧湾
为惊涛淹没的善行哭喊
咆哮于光之消散
狂者如夸父逐日
高歌中顿觉迟来的伤感

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐