马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 OKOne 于 2014-7-1 17:52 编辑 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,d
mov ss,ax
mov ax,a
mov ds,ax
mov sp,8
mov bx,7
mov cx,4
p: push [bx]
sub bx,2
loop p
mov ax,d
mov ds,ax
mov ax,b
mov es,ax
mov bx,0
mov cx,8
t: mov ax,es:[bx]
add [bx],ax
inc bx
loop t
mov ax,4c00h
int 21h
code ends
end start
以上为实验5(5题) 看看是否正确
以下为实验5(6题) 看看是否正确
assume cs:code
a segment
db 1,2,3,4,5,6,7,8,9,0ah,0bh,0ch,0dh,0eh,0fh,0ffh
a ends
b segment
db 0,0,0,0,0,0,0,0
b ends
code segment
start:mov ax,a
mov ds,ax
mov ax,b
mov ss,ax
mov cx,8
mov bx,0
mov sp,16
s: push [bx]
add bx,2
loop s
mov ax,4c00h
int 21h
code ends
end start
|