.386
.model flat,stdcall
option casemap:none
.data
filename db 'monst.txt',0
.code
start:
lea dx,filename
mov cx,0
mov ah,3ch
int 21h
end start
为什么这个程序可以编译通过,可是最后的EXE文件却不能运行?我也试过了其它的程序,有好多都 是可以编译通过,但不能打开运行的?请问有没有高手知道这是为什么?谢谢
.386
.model flat,stdcall
option casemap:none
.data
filename db 'monst.txt',0
.code
start:
lea dx,filename
mov cx,0
mov ah,3ch
int 21h
end start
为什么这个程序可以编译通过,可是最后的EXE文件却不能运行?我也试过了其它的程序,有好多都 是可以编译通过,但不能打开运行的?请问有没有高手知道这是为什么?谢谢
Category: D - DOS kernel
Inp.:
AH = 3Ch
CX = file attributes (see #01378)
DS:DX -> ASCIZ filename
Return: CF clear if successful
AX = file handle
CF set on error
AX = error code (03h,04h,05h) (see #01657 at AH=59h/BX=0000h)
Notes: if a file with the given name exists, it is truncated to zero length
under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
DR DOS checks the system password or explicitly supplied password at
the end of the filename against the reserved field in the directory
entry before allowing access
Copied from Ralf Brown's Interrupt List
不能运行。。不知道会不会是连接成PE格式,所以才不行。。。