Write an
assignment on directory functions 39H (Create directory), 3AH
(Delete directory) of DOS INT 21H
and program to
simulate MD (Make
directory), RD (Remove
Directory) commands.
theory:
A directory is actually a folder which we create in our
drives
A hierarchical structure is a one which consists of sub
directories within directories
The root directory (main directory) contains files and other
directories.
The work directory further contains directories and files.
Hence to access any file or sub directory we need to specify
the particular path.
Function 39H:
Create directory
This function is used to create a subdirectory in the
current directory or a root directory in the particular drive.
Eg: when we give the path in the program as \ubaid, it will
create a root directory in drive C.
Eg: when we give the path in the program C :\tasm\bin\ubaid,
it will create a subdirectory in directory bin
For its occurrence AH must be loaded with 39H
The path must be pointed by DS : DX
Function
3AH : Delete directory
This function is used to delete a directory (root or
subdirectory)
For its occurrence AH must be loaded with value 3AH
The directory name must be pointed with DS : DX
The directory must be empty for this function to complete
successfully
If deleted successfully:
Carry flag = clear ; else
Carry flag = set ; AX = error code