汇编语言 王爽第六章 实验五 第六题 我就五分了帮忙看一下对不
assumecs:codeasegmentdb1,2,3,4,5,6,7,8,9,0ah,0bh,0ch,0dh,0eh,0fh,0ffhaendsbsegmentdb0...
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,0
mov ds,ax
mov ax,0
mov ss,ax
mov sp,[20]
mov cx,8
mov dx,ds:[0]
s:mov bx,dx
push bx
inc dx
loop s
mov ax,4c00h
int 21h
code ends
end start
ssume 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,13ef
mov ds,ax
mov ax,13ef
mov ss,ax
mov sp,[20]
mov cx,8
mov dx,ds:[0]
s:mov bx,dx
push bx
inc dx
loop s
mov ax,4c00h
int 21h
code ends
end start 展开
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,0
mov ds,ax
mov ax,0
mov ss,ax
mov sp,[20]
mov cx,8
mov dx,ds:[0]
s:mov bx,dx
push bx
inc dx
loop s
mov ax,4c00h
int 21h
code ends
end start
ssume 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,13ef
mov ds,ax
mov ax,13ef
mov ss,ax
mov sp,[20]
mov cx,8
mov dx,ds:[0]
s:mov bx,dx
push bx
inc dx
loop s
mov ax,4c00h
int 21h
code ends
end start 展开
1个回答
展开全部
你这里面的 错误真不少,你还是看看正确的程序怎么写吧!
=============================================================
assume cs:code
a segment
dw 1,2,3,4,5,6,7,8
a ends
b segment
dw 0,0,0,0,0,0,0,0
b ends
code segment
start: mov ax,a ; 你这里就错了
mov ds,ax ;ds指向a段
mov ax,b
mov bx,0 ;ds:bx指向a段的第1个单元
mov ss,ax
mov sp,16 ;设置栈顶指向b:16 ,你看看这里你是怎么设置的?
mov cx,8
s: push [bx]
add bx,2
loop s ;将a段中0~16个单元逆次入栈
mov ax,4c00h
int 21h
code ends
end start
=============================================================
assume cs:code
a segment
dw 1,2,3,4,5,6,7,8
a ends
b segment
dw 0,0,0,0,0,0,0,0
b ends
code segment
start: mov ax,a ; 你这里就错了
mov ds,ax ;ds指向a段
mov ax,b
mov bx,0 ;ds:bx指向a段的第1个单元
mov ss,ax
mov sp,16 ;设置栈顶指向b:16 ,你看看这里你是怎么设置的?
mov cx,8
s: push [bx]
add bx,2
loop s ;将a段中0~16个单元逆次入栈
mov ax,4c00h
int 21h
code ends
end start
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询