User`s guide
 Table 2-2 displays the relationship between data block size and drive capacity.
 Table 2-2. Logical Drive Capacity
 Data Block Size Maximum Drive Capacity
 1K 256 Kilobytes
 2K 64 Megabytes
 4K 128 Megabytes
 8K 256 Megabytes
 16K 512 Megabytes
 Logical drives are divided into two regions: a directory area and a data area. The
 directory area contains from one to sixteen blocks located at the beginning of the
 drive. The actual number is set in the BIOS. This area contains entries that define
 which files exist on the drive. The directory entries corresponding to a particular file
 define those data blocks in the drive's data area that belong to the file. These data
 blocks contain the file's records. The directory area is logically subdivided into six-
 teen independent directories identified as user 0 through 15. Each independent direc-
 tory shares the actual directory area on the drive. However, a file's directory entries
 cannot exist under more than one user number. In general, only files belonging to
 the current user number are visible in the directory.
 Each disk file consists of a set of up to 262,144 128-byte records. Each record in
 a file is identified by its position in the file. This position is called the record's random
 record number. If a file is created sequentially, the first record has a position of zero,
 while the last record has a position one less than the number of records in the file.
 Such a file can be read sequentially in record position order beginning at record zero,
 or randomly by record position. Conversely, if a file is created randomly, records are
 added to the file by specified position. A file created in this way is called sparse if
 positions exist within the file where a record has not been written.
 The BDOS automatically allocates data blocks to a file to contain its records on
 the basis of the record positions consumed. Thus, a sparse file that contains two
 records, one at position zero, the other at position 262,143, consumes only two data
 blocks in the data area. Sparse files can only be created and accessed randomly, not
 sequentially. Note that any data block allocated to a file is permanently allocated to
 the file until the file is deleted or truncated. These are the only mechanisms supported
 by the BDOS for releasing data blocks belonging to a file.
2-12
2.3 BDOS File System CP/M 3 Programmer's Guide










