.model small
.data
filename db "name.txt",0
err db "error$"
.code
start:
mov ax,@data
mov ds,ax
;;file is opening
mov ah,3dh
lea dx,filename
mov al,0
int 21h
jc err1
;delete the file not working
mov ah, 41h
lea dx,filename
int 21h
mov ah,4ch
int 21h
err1: lea dx,err
mov ah,09h
int 21h
end start
我正在尝试从目录中删除该文件,但代码无法正常工作,我可以打开并读取该文件,但无法删除该文件。我的代码怎么了?
答案 0 :(得分:3)
可能您的操作系统不允许删除打开的文件,请尝试关闭它:
EditText