User`s guide
The BDOS updates the memory copy of the FCB during file processing to maintain
the current position within the file. During file write operations, the BDOS updates
the memory copy of the FCB to record the allocation of data to the file, and at the
termination of file processing, the Close File function permanently records this infor-
mation on disk. Note that data allocated to a file during file write operations is not
completely recorded in the directory until the calling program issues a Close File call.
Therefore,, a program that creates or modifies files must close the files at the end of
any write processing. Otherwise, data might be lost.
The BDOS Search and Delete functions support multiple or ambiguous file refer-
ences. In general, a question mark in the filename, filetype, or extent field matches
any value in the corresponding positions of directory FCBs during a directory search
operation. The BDOS search functions also recognize a question mark in the drive
code field, and if specified, they return all directory entries on the disk regardless of
user number, including empty entries. A directory FCB that begins with E5H is an
empty directory entry.
2.3.4 File Attributes
The high-order bits of the FCB filename, fl',...,f8', and filetype, tl',t2',t3', fields
are called attribute bits. Attributes bits are 1 bit Boolean fields where 1 indicates on
or true, and 0 indicates off or false. Attribute bits indicate two kinds of attributes
within the file system: file attributes and interface attributes.
The file attribute bits, fl ...... f4' and tl',t2',t3', can indicate that a file has a defined
file attribute. These bits are recorded in a file's directory FCBS. File attributes can be
set or reset only by the BDOS Set File Attributes function. When the BDOS Make
File function creates a file, it initializes all file attributes to zero. A program can
interrogate file attributes in an FCB activated by the BDOS Open File function, or in
directory FCBs returned by the BDOS Search For First and Search For Next functions.
Note: the BDOS file system ignores file attribute bits when it attempts to locate a file
in the directory.
The file system defines the file attribute bits, tl',t2',t3', as follows:
tl': Read-Only attribute - The file system prevents write operations to a file with
the read-only attribute set.
2-16
2.3 BDOS File System CP/M 3 Programmer's Guide