I see. So, I changed the code and still after running it, nothing happens. The file meant to be removed is still there.
What could have gone wrong?
org 100h
mov dx, filename
mov ah, 41h
int 21h
mov ah, 4Ch
int 21h
filename db 'C:\delete.txt', '$'
edit: I added some messages to the code so the user knows wheter the delete function worked or not.
org 100h
mov dx, filename
mov ah, 41h
int 21h
jnc sucess_message
fail_message:
mov dx, fail_msg
mov ah, 9
int 21h
jmp end
sucess_message:
mov dx, sucess_msg
mov ah, 9
int 21h
end:
mov ah, 4Ch
int 21h
filename db 'C:\delete.txt', '$'
fail_msg db 'File could not be deleted.', '$'
sucess_msg db 'File removed sucessfully.', $