关于王爽老师与小甲鱼老师的不同
assume cs:codecode segment
dw 0123h,0456h,0789h,0abch,0defh,0fedh,0cbah,0987h
dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
start: mov ax,cs
mov ss,ax
mov sp,30h
mov bx,0
mov cx,8
s:push cs:
add bx,2
loop s
mov bx,0
mov cx,8
s0:pop cs:
add bx,2
loop s0
mov ax,4c00h
int 21h
code ends
end start
王爽老师把:dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
设为16个字,把sp设为30h
而小甲鱼老师设的是8个字,把sp设为32 ,我把两位老师的用debug都运行、跟踪了几次,比较看了一下,王爽老师的能符合程序,而小甲鱼老师的在内存中最后几个数就与程序不符合。不知是什么原因,王爽老师为什么把栈设为16个字,8个字应该够了啊?前面的数据段不是占8个字吗?哪位老师请指点一下。
页:
[1]