我实验11的源程序:
;文件 C:/MASM/src/xles.asm
assume cs:codesg
datasg segment
db "Beginner's All-purpose Symbolic Instruction Code.",0
datasg ends
codesg segment
begin:
mov ax,datasg
mov ds,ax
mov si,0
call letterc
mov ax,4c00h
int 21h
letterc:
push ax
push cx
mov al,[si]
mov cl,al
mov ch,0
jcxz ok
cmp al,61h
jb unch
cmp al,7ah
ja unch
and al,11011111b
mov [si],al
unch:
inc si
jmp letterc
ok:
pop cx
pop ax
ret
codesg ends
end begin
我不知道为什么,汇编、链接生成的可执行文件每次双击运行,Windows总是会报错,错误消息:
C:\MASM\src\xles.exe
NTVDM CPU 遇到无效的指令。
CS:0E56 IP:ff1e OP:63 00 43 0e 75 选择“关闭”终止应用程序。
在debug中单步执行,到call指令时用p指令,也会出现类似的报错。
各位看看,是什么原因? |