王爽,实验3
单步调试遇到这种情况?我想是不是没有栈。。
2012-09-27 10:40
2012-09-27 10:42
2012-09-27 10:44
程序代码:assume cs:codesg codesg segment mov ax,2000h mov ss,ax mov sp,0h add sp,4h pop ax pop bx push ax push bx pop ax pop bx mov ax,4c00h int 21h codesg ends end代码如上

2012-09-27 10:44
程序代码:
;#Mode=DOS
;MASMPlus 单文件代码模板 - 纯 DOS 程序
;--------------------------------------------------------------------
;单个文件需要指定编译模式,否则默认是EXE方式,在系统设置中可以设置默认是DOS还是Windows.
;编译模式自带了DOS/COM/CON/EXE/DLL/LIB这几种,如果有必要,可以更改ide.ini添加新的编译模式
;当然,更好的是创建为一个工程.更方便及易于管理,使用方法:按Ctrl多选->创建工程.必须有多个文件
.model small
.stack 200h
.data
szMsg db 'Hello World!',13,10,'$'
.CODE
START:
mov ax,@data
mov ds,ax
lea dx,szMsg
mov ah,9
int 21h
;暂停,任意键关闭
mov ah,1
int 21h
mov ah,4ch ;结束,可以修改al设置返回码
int 21h
END START
2012-09-27 10:49

2012-09-27 10:52
2012-09-27 10:54
2012-09-27 10:57
mov ss,ax mov sp,0h add sp,4h我连续试了add sp, xxh几个数 发现2h, 5h 不会提示错误 但会直接跳出单步 6h以上就可以

2012-09-27 11:06
2012-09-27 11:11