求简单汇编代码注释~~
时间:2011-10-11
来源:互联网
求程序注释:
第一个程序:
data segment
score db 76, 69, 84, 90, 73, 88, 99, 63, 100, 80
s6 db 0
s7 db 0
s8 db 0
s9 db 0
s10 db 0
data ends
code segment
assume cs:code,ds:data
_main:
mov ax, data
mov ds, ax
lea si, score
mov cx, 10
cld
_next_score:
lodsb
cmp al, 60
jb _loop
cmp al, 69
ja _70_79
lea bx, s6
jmp _add_
_70_79:
cmp al, 79
ja _80_89
lea bx, s7
jmp _add_
_80_89:
cmp al, 89
ja _90_99
lea bx, s8
jmp _add_
_90_99:
cmp al, 100
je _100
lea bx, s9
jmp _add_
_100:
lea bx, s10
_add_:
inc byte ptr [bx]
_loop:
loop _next_score
mov ax, 4C00H
int 21H
code ends
end _main
第二个程序
data segment
string1 db "111111111",13,10,"$"
string2 db "111111111",13,10,"$"
inf1 db "match!",13,10,"$"
inf2 db "no match!",13,10,"$"
data ends
code segment
main proc far
assume ds:data,cs:code,es:code
start: push ds
mov ax,0
push ax
mov ax,data
mov ds,ax
mov es,ax
lea si,string1
lea di,string2
mov cx,9
repz cmpsb
jz match
lea dx,inf2
jmp disp
match:lea dx,inf1
disp :mov ah,09
int 21h
ret
main endp
code ends
end start
第一个程序:
data segment
score db 76, 69, 84, 90, 73, 88, 99, 63, 100, 80
s6 db 0
s7 db 0
s8 db 0
s9 db 0
s10 db 0
data ends
code segment
assume cs:code,ds:data
_main:
mov ax, data
mov ds, ax
lea si, score
mov cx, 10
cld
_next_score:
lodsb
cmp al, 60
jb _loop
cmp al, 69
ja _70_79
lea bx, s6
jmp _add_
_70_79:
cmp al, 79
ja _80_89
lea bx, s7
jmp _add_
_80_89:
cmp al, 89
ja _90_99
lea bx, s8
jmp _add_
_90_99:
cmp al, 100
je _100
lea bx, s9
jmp _add_
_100:
lea bx, s10
_add_:
inc byte ptr [bx]
_loop:
loop _next_score
mov ax, 4C00H
int 21H
code ends
end _main
第二个程序
data segment
string1 db "111111111",13,10,"$"
string2 db "111111111",13,10,"$"
inf1 db "match!",13,10,"$"
inf2 db "no match!",13,10,"$"
data ends
code segment
main proc far
assume ds:data,cs:code,es:code
start: push ds
mov ax,0
push ax
mov ax,data
mov ds,ax
mov es,ax
lea si,string1
lea di,string2
mov cx,9
repz cmpsb
jz match
lea dx,inf2
jmp disp
match:lea dx,inf1
disp :mov ah,09
int 21h
ret
main endp
code ends
end start
作者: bbayaya 发布时间: 2011-10-11
你这个程序到底哪里不懂圈出来嘛,要别人一点点看你这些代码,大多数人是没有耐心的。你没有明确的提出自己的问题。
作者: haojiahuo50401 发布时间: 2011-10-12
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28