实验5.5练习作业
assume cs:codea segment
db 1,2,3,4,5,6,7,8
a ends
b segment
db 1,2,3,4,5,6,7,8
b ends
c1 segment
db 0,0,0,0,0,0,0,0
c1 ends
code segment
start: mov ax,c1
mov ss,ax
mov sp,16
mov ax,b
mov ds,ax
mov ax,a
mov es,ax
mov bx,0
mov cx,8
s:mov al,es:
add al,ds:
add ss:,al
inc bx
loop s
mov ax,4c00h
int 21h
code ends
end start assume cs:code
a segment
db 1,2,3,4,5,6,7,8
a ends
b segment
db 1,2,3,4,5,6,7,8
b ends
c1 segment
db 0,0,0,0,0,0,0,0
c1 ends
code segment
start: mov ax,c1
mov ss,ax
mov sp,16
mov ax,b
mov ds,ax
mov ax,a
mov es,ax
mov bx,0
mov cx,8
s:mov al,es:
add al,ds:
add ss:,al【题目中说是把结果存到c段中,所以此处也可以改为mov ss:【bx】 ,al
inc bx
loop s
mov ax,4c00h
int 21h
code ends
end start 文小诗 发表于 2020-3-15 17:58
assume cs:code
a segment
是的,可以直接赋值!
你真的太厉害了。
页:
[1]