;对文件操作还不熟悉,所以不太清楚为什么会出现如图的内容,请高手明示,谢谢了!!!
filedata segment
;record the file name
filename db 'F:\KuGou\cry.mp3',0dh,0ah,'00h';100,?,100 dup()
filelen db $-filename
frdsuc db 'file opened successful!~_~',0dh,0ah,'$'
frdfail db 'file opening failed >_<',0dh,0ah,'$'
filedata ends
program segment
assume ds:filedata,cs:program
start:
; mov dx,offset filename
; mov ah,0ah
; int 21h
mov dx,offset filename
mov ah,0Fh
int 21h
cmp al,00h
jne clue1
mov dx,offset frdsuc
mov ah,09h
int 21h
jmp endf
clue1:mov dx,offset frdfail
mov ah,09h
int 21h
endf:mov ah,4ch
int 21h
program ends
end start
------解决方案--------------------------------------------------------
将 filename db 'F:\KuGou\cry.mp3',0dh,0ah,'00h' ;100,?,100 dup()
改成 filename db 'F:\KuGou\cry.mp3',0