views:

56

answers:

1

hi I write a program to delete a file from somewhere of my harddisk in 8086 but when i use int 21h (ah=41h) an error happens and carry set to 1.and I cannot delete that. does anyone know what can I do? I think it should be from protected mode which does not allow my program to delete another file.I want the answer and language is not matter.

+1  A: 

If you assemble and link your program to as a DOS executable, it should work (provided the code is correct for DOS, of course).

My guess is that you're assembling and linking it to a Windows executable. In that case, you need to use the Windows DeleteFile function to delete the file.

Jerry Coffin