Chawter
1
I
Svstem
Calls
ChMod
Change Attributes Function Call
43H
Gets the attributes
of
a file, or sets the attributes
of
a file to
those specified. (See the section “Disk Directory” in Chapter
4
for
a
description
of
file attributes.)
Entry Conditions:
AH
=
43H
DS:DX
=
pointer to
ASCII2
pathname of
file
AL
=
function number
01H
=
set file’s attributes
to
those in CX
OOH
=
return file’s attributes in CX
CX
=
attribute(s) to be set
Exit Conditions:
Carry set:
Carry not set:
Error Returns:
AX
=
3
AX
=
5
AX
=
error
code
CX
=
current attribute(s) (if
AL
=
OOH
on entry)
Path not found. The path specified was invalid.
Access denied. The attributes specified in
CX
included
one that could not be changed (directory, volume ID).
Invalid function. The function passed in AL was not
in the range 0-1.
AX
=
1
Example:
ChMod
equ
43H
Id5 dx,pathname
mov
dx,attribute
mov
a1,function
mov
ah,43H
int
21
H
115