|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 f393 于 2017-7-13 14:14 编辑
汇编的实验五的5小题,本身想自己攻克,想了半天又写了半天,却总是编译不成功。无奈之下看答案,却还是编写不了,视频也没有讲解,求教啊!
我写的指令: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
c segment
db 0,0,0,0,0,0,0,0
c ends
code segment
start: mov ax,a
mov es,ax
mov ax,c
mov ds,ax
mov bx,0
mov cx,8
s: mov al,es:[bx]
mov [bx],al
inc bx
loop s
mov ax,b
mov ss,ax
mov bx,0
mov cx,8
y: mov al,ss:[bx]
add es:[bx],al
inc bx
loop y
mov ax,4C00H
int 21H
code ends
end start
不要用符号c 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
d segment
db 0,0,0,0,0,0,0,0
d ends
code segment
start: mov ax,a
mov es,ax
mov ax,d
mov ds,ax
mov bx,0
mov cx,8
s: mov al,es:[bx]
mov [bx],al
inc bx
loop s
mov ax,b
mov ss,ax
mov bx,0
mov cx,8
y: mov al,ss:[bx]
add es:[bx],al
inc bx
loop s
mov ax,4C00H
int 21H
code ends
end start
|
|