Write an assignment on ASCIIZ string, file handle, file functions 41H (delete file), 56H (Rename file) of DOS INT 21H and program to simulate DEL (Delete file) and REN
(Rename file) command.
(Rename file) command.
Function 41H : delete file
This interrupt deletes a file from the specified or default
disk or directory.
For its occurrence AH must be loaded with 41H
DS:DX contains the segment : offset of the filename
If function is successful:
Carry flag = clear
If function is unsuccessful
Carry flag = set
AX = error code
Function 56H : rename file
For its occurrence, AH must be loaded with 56h
DS:SI = segment: offset of current filename
ES:DI = segment: offset of new filename
If function is successful
Carry flag = clear
If function is unsuccessful
Carry flag = set
AX = error code
Note that the file will not be renamed if the pathname does
not exist
If the new filename already exists then also then also the
file will not be renamed
No comments:
Post a Comment