Write an
assignment on file function 43H (Set/Get file attribute) and
57h(set/get date and time) of DOS INT 21H and program to display the
attributes.
Function 43H
: Set/Get file attribute
With the help of this function we are able to set or get the
file attributes
For its occurrence AH must be preloaded by 43H
The value of AL must be loaded according to our requirement:
If AL = 0;
get attribute
AL = 1;
set attribute
CX register must be loaded with the new attribute values
The file name must be pointed by DS : DX
Function 57h: Set/Get date and time
With the help of this function, we are able to set/get the creation date and time.
for its occurrence AH must be preloaded by 57h
The value of AL must be loaded according to our requirement:
If AL = 0;
get date and time
AL = 1;
set date and time
After successful execution, CX will contain the time and DX will contain the date
the time format is as follows:
bits (15-11) = hours
bits (10-5) = minutes
bits (4-0) = seconds
the date format is as follows:
bits (15-9) = year after 1980
bits (8-5) = month
bits (0-4) = date
No comments:
Post a Comment