倒序复制,debug跟踪一个8次循环,到第7次就崩溃,是什么原因?程序有错吗?王爽,汇编语言实验5,
assumecs:codeasegmentdw1,2,3,4,5,6,7,8,9,0ah,0bh,0ch,0dh,0eh,0fh,0ffhaendsbsegmentdw0...
assume cs:code
a segment
dw 1,2,3,4,5,6,7,8,9,0ah,0bh,0ch,0dh,0eh,0fh,0ffh
a ends
b segment
dw 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 sp,16
mov bx,0
mov cx,8
s: push [bx]
inc bx
inc bx
loop s
mov ax,4c00h
int 21h
code ends
end start 展开
a segment
dw 1,2,3,4,5,6,7,8,9,0ah,0bh,0ch,0dh,0eh,0fh,0ffh
a ends
b segment
dw 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 sp,16
mov bx,0
mov cx,8
s: push [bx]
inc bx
inc bx
loop s
mov ax,4c00h
int 21h
code ends
end start 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询