- Assembly code
assume cs:codea segment dw 1,2,3,4,5,6,7,8,9,0ah,0bh,0ch,0dh,0eh,0fh,0ffha endsb segment dw 0,0,0,0,0,0,0,0b endscode segment start: mov ax,a mov ds,ax mov ax,b mov ss,ax mov sp,16 mov cx,8 mov bx,0 s: push [bx] add bx,2 loop s mov ax,4c00h int 21h code endsend start
我debug加载后,t命令执行到cx=3的时候就崩溃了,怎么回事?
------解决方案--------------------------------------------------------
增大堆栈,比如: mov sp,100h
------解决方案--------------------------------------------------------
栈的空间不足,改大一点。
------解决方案--------------------------------------------------------