
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Programmers Reference 0.02b - <b>function 43h (67) get or set file attributes (chmod)</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function 43h (67) Get or Set File Attributes (CHMOD)
Gets or sets the attributes of a specified file.
1. To get attributes
On entry: AH 43h
AL 00h
DS:DX Pointer to filespec (ASCIIZ string)
Returns: CX File's attributes, or
AX Error code, if CF is set
2. To set attributes
On entry: AH 43h
AL 01h
CX Desired attributes
DS:DX Pointer to filespec (ASCIIZ string)
Returns: AX Error code, if CF is set
Error codes: 1 Invalid function code
2 File not found
3 Path not found
5 Access denied
Call Function 59h for extended error code information
(DOS 3.0 and above).
Network: To change any attribute bit other than archive,
requires Create access rights.
--------------------------------------------------------------------------
This function returns or sets the attribute byte of the specified
file. To determine the current attributes, put 00h in AL; the
attribute byte is returned in CX. To set attributes, put 01h in AL and
the desired attribute byte in CX.
Notes: The CX register specifies the attribute of the file
you're creating, as follows:
CX Attribute specified
00h Normal
01h Read-only
02h Hidden
04h System
20h Archive
Sum the values to combine attributes.
Setting any of the bits other than the above will
generate an error.
See Also: 3Ch 59h File Attributes
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson