请学过汇编的朋友帮忙注释一小段程序?

来源:百度知道 编辑:UC知道 时间:2024/05/05 03:12:32
多字节加:
代码如下。请帮忙把重点语句做一下注释。谢谢!
data segment
a db 9ah,78h,56h,34h,12h
b db 23h,01h,0efh,0cdh,0abh
c db 5 dup(?)
data ends
code segment
assume cs:code,ds:data
start:
xor ax,ax
xor cx,cx
xor bx,bx
xor dx,dx
xor si,si
xor di,di

cli
sti

clc
stc

mov ax,data
mov ds,ax

mov si,offset a
mov di,offset b
mov bx,offset c
clc
mov cx,5
tt: mov al,byte ptr[si]
mov dl,byte ptr[di]
adc al,dl
mov byte ptr[bx],al
inc si
inc di
inc bx
loop tt
mov ah,4ch
int 21h
code ends
end start

data segment
a db 9ah,78h,56h,34h,12h
b db 23h,01h,0efh,0cdh,0abh
c db 5 dup(?)
data ends ;数据段初始化
code segment
assume cs:code,ds:data
start:
xor ax,ax
xor cx,cx
xor bx,bx
xor dx,dx
xor si,si
xor di,di;置零ax,cx等

cli
sti

clc
stc 不知道问什么这样写。。。。结果是置位if,cf

mov ax,data
mov ds,ax ; 初始化数据段位置

mov si,offset a
mov di,offset b
mov bx,offset c ;si,di,bx分别指向a,b,c数组
clc 。。。怎么又是clc,清空cf
mov cx,5 ;循环次数
tt: mov al,byte ptr[si]
mov dl,byte ptr[di]
adc al,dl
mov byte ptr[bx],al
inc si
inc di
inc bx
loop tt ;将di,si作为标记指针,完成对a,b对位相加并放入c中
mov ah,4ch
int 21h ;dos功能调用中断 ,类型4ch
code ends
end start

;数据段初始数据,分别为 a,b,c
data segment
a db 9ah,78h,56h,34h,12h
b db 23h,01h,0efh,0cdh,