System information

Three examples of DISKDEF macro invocations are shown below with corresponding STAT
parameter values. The last example produces a full 8-megabyte system.
DISKDEF 0,1,58,,2048,256,128,128,2
r=4096, k=512, d=128, c=128, e=256, b=16, s=58, t=2
DISKDEF 0,1,58,,2048,1024,300,0,2
r=16348, k=2048, d=300, c=0, e=128, b=16, s=58, t=2
DISKDEF 0,1,58,,16348,512,128,128,2
r=65536, k=8192, d=128, c=128, e=1024, b=128, s=58, t=2
6.12 Sector Blocking and Deblocking
Upon each call to BIOS WRITE entry point, the CP/M BDOS includes information that allows
effective sector blocking and deblocking where the host disk subsystem has a sector size that is a
multiple of the basic 128-byte unit. The purpose here is to present a general-purpose algorithm
that can be included within the BIOS and that uses the BDOS information to perform the
operations automatically.
On each call to WRITE, the BDOS provides the following information in register C:
0 = (normal sector write)
1 = (write to directory sector)
2 = (write to the first sector of a new data block)
Condition 0 occurs whenever the next write operation is into a previously written area, such as a
random mode record update; when the write is to other than the first sector of an unallocated
block; or when the write is not into the directory area. Condition 1 occurs when a write into the
directory area is performed. Condition 2 occurs when the first record (only) of a newly allocated
data block is written. In most cases, application programs read or write multiple 128-byte sectors
in sequence; thus, there is little overhead involved in either operation when blocking and
deblocking records, because preread operations can be avoided when writing records.
6.11 The DISKDEF Macro Library CP/M Operating System Manual
6-39