User`s guide

Transient programs depend on the BDOS file system to create, update, and main-
tain disk files. This section describes the capabilities of the BDOS file system in detail.
You must understand the general features of CP/M 3 described in Section 1 before
you can use the detail presented in this section.
The remaining introductory paragraphs define the four categories of BDOS file
functions. This is followed by a review of file naming conventions and disk and file
organization. The section then describes the data structure used by the BDOS file,
and directory oriented functions: the File Control Block (FCB). Subsequent discus-
sions cover file attributes, user numbers, directory labels and extended File Control
Blocks (XFCBs), passwords, date and time stamping, blocking and deblocking, multi-
sector I/O, disk reset and removable media, byte counts, and error handling. These
topics are closely related to the BDOS file system. You must be familiar with the
contents of Section 2 before attempting to use the BDOS functions described individ-
ually in Section 3.
The BDOS file system supports four categories of functions: file access functions,
directory functions, drive related functions, and miscellaneous functions. The file
access category includes functions to create a file, open an existing file, and close a
file. Both the make and open functions activate the file for subsequent access by
BDOS file access functions. The BDOS read and write functions are file access func-
tions that operate either sequentially or randomly by record position. They transfer
data in units of 128 bytes, which is the basic record size of the file system. The close
function makes any necessary updates to the directory to permanently record the
status of an activated file.
2-7
2.3 BDOS File System CP/M 3 Programmer's Guide