汇编网首页登录博客注册
alibaba的学习博客
博客首页博客互动【做检测题】论坛求助

我的博客

个人首页 |  我的文章 |  我的相册 |  我的好友 |  最新访客 |  文章收藏 |  论坛提问 |  友情链接 |  给我留言  

[2009-03-06 08:36] 堆栈段长度为0,pop出错

assume cs:codesg
codesg segment
        mov ax,2000h
        mov ss,ax
        mov sp,0
        add sp,4
        pop ax
        pop bx
        push ax
        push bx
        pop ax
        pop bx
        mov ax,4c00h
        int 21h
codesg ends
end

王爽老师书上第88页实验三
mov sp,0 将堆栈段的长度设置为0
pop ax 出错

add sp,4只是把sp指针往上移动了4位,实际上堆栈段的长度没有改变

用debug发现的
不知道我说的对不...
阅读全文 | 评论次数(1) | 浏览次数(209) | 所属类型(默认类型)