<<汇编语言>>,王爽,程序6.3

assume cs:code
code segment
dw 1,2,3
dw 0,0,0
start:
mov ax,cs
mov ss,ax
mov sp,12
mov cx,3
mov bx,0

s:push cs:[bx]
add bx,2
loop s

mov bx,0
mov cx,3
t:pop cs:[bx]
add bx,2
loop t

mov ax,4c00h
int 21h
code ends
end start

为什么当字型数据个数少于4个时(sp=4*n,cx=n),程序结果就会错误?

不要用debug 要用就把堆栈设高点 因为DEBUG本身也要用堆栈 或者直接运行程序。
温馨提示:答案为网友推荐,仅供参考