fix capitalization error in man page font specification
[debian/cpmtools] / cpm.5.in
index ce7779df200f4a350e28e769c027edcf1795bbdc..5c642e6b9dd998ae1778177bddb78382307908e0 100644 (file)
--- a/cpm.5.in
+++ b/cpm.5.in
@@ -24,20 +24,23 @@ Logical sector skew
 .br
 Number of reserved system tracks (optional)
 .br
-Offset to start of volume (optional)
+Offset to start of volume (optional and not covered by operating system,
+but disk driver specific)
 .sp
 .RE
 A block is the smallest allocatable storage unit.  CP/M supports block
 sizes of 1024, 2048, 4096, 8192 and 16384 bytes.  Unfortunately, this
 format specification is not stored on the disk and there are lots of
 formats.  Accessing a block is performed by accessing its sectors, which
-are stored with the given software skew.
+are stored with the given software skew.  \fBcpmtools\fP always counts
+sectors starting with 0, as it deals with logical sectors.  CP/M uses physical
+sectors in the skew table, which often start with 1.
 .\"}}}
 .SS "Device areas" \"{{{
-A CP/M disk contains three areas:
+A CP/M disk contains four areas:
 .RS
 .sp
-Volume offset (optional)
+Volume offset (optional and not covered by operating system, but disk driver specific)
 .br
 System tracks (optional)
 .br
@@ -54,15 +57,25 @@ drive for the first time, CP/M builds this bitmap in core from the directory.
 .LP
 A hard disk can have the additional notion of a \fIvolume offset\fP to
 locate the start of the drive image (which may or may not have system
-tracks associated with it). The base unit for volume offset is byte
+tracks associated with it).  The base unit for volume offset is byte
 count from the beginning of the physical disk, but specifiers of
 \fIK\fP, \fIM\fP, \fIT\fP or \fIS\fP may be appended to denote
 kilobytes, megabytes, tracks or sectors.  If provided, a specifier
 must immediately follow the numeric value with no whitespace.  For
 convenience upper and lower case are both accepted and only the first
 letter is significant, thus 2KB, 8MB, 1000trk and 16sec are valid
-values. Offset must appear subsequent to track, sector and sector
-length values.
+values.  The \fBoffset\fP must appear subsequent to track, sector and sector
+length values for the sector and track units to work.
+.LP
+Note that it is possible to reserve space between the directory and
+the beginning of data.  Although typically data follows the directory,
+some systems used this to store extra data instead of using more
+system tracks (see the fields \fBALV0\fP and \fBALV1\fP in the
+DPB).
+.LP
+There are disk formats that map multiple logical tracks onto a physical
+track, which allows a little bit more capacity in case the system image
+size does not match the physical track capacity well.
 .\"}}}
 .SS "Directory entries" \"{{{
 The directory is a sequence of directory entries (also called extents),
@@ -79,9 +92,10 @@ Al   Al      Al      Al      Al      Al      Al      Al      Al      Al      Al      Al      Al      Al      Al      Al
 \fBSt\fP is the status; possible values are:
 .RS
 .sp
-0\*(en15: used for file, status is the user number
+0\*(en15: used for file, status is the user number.  CP/M 2.2 only documents
+0\*(en15 and CCP and PIP only offer those, but the BDOS allows to use 0\*(en31.
 .br
-16\*(en31: used for file, status is the user number (P2DOS)
+16\*(en31: used for file, status is the user number (P2DOS, CP/M 2.2)
 or used for password extent (CP/M 3 or higher)
 .br
 32: disc label
@@ -148,11 +162,13 @@ Rc stores the number of 128 byte records of the last used logical extent.
 Bc stores the number of bytes in the last used record.  The value 0 means
 128 for backward compatibility with CP/M 2.2, which did not support Bc.
 ISX records the number of unused instead of used bytes in Bc.
+This only applies to files with allocated blocks.  For an empty file, no
+block is allocated and Bc 0 has no meaning.
 .\"}}}
 .LP
 .\"{{{ Al     = allocated blocks
 \fBAl\fP stores block pointers.  If the disk capacity minus boot
-tracks but including the directory area is less than 256 blocks, Al
+tracks but including the directory area is less than or equal to 256 blocks, Al
 is interpreted as 16 byte-values, otherwise as 8 double-byte-values.
 Since the directory area is not subtracted, the directory area starts
 with block 0 and files can never allocate block 0, which is why this
@@ -199,6 +215,7 @@ time stamp.
 1 byte minute in BCD format
 .sp
 .RE
+All time stamps are stored in local time.
 .\"}}}
 .SS "DateStamper time stamps" \"{{{
 The DateStamper software added functions to the BDOS to manage
@@ -214,11 +231,13 @@ following structure of 16 bytes:
 .br
 5 bytes modify datefield
 .br
-1 byte checksum
+1 byte magic number/checksum
 .sp
 .RE
-The checksum is only used on every 8th entry (last entry in 128-byte
-record) and is the sum of the first 127 bytes of the record.
+The magic number is used for the first 7 entries of each 128-byte record
+and contains the characters \fB!\fP, \fB!\fP, \fB!\fP, \fBT\fP, \fBI\fP,
+\fBM\fP and \fBE\fP.  The checksum is used on every 8th entry (last entry
+in 128-byte record) and is the sum of the first 127 bytes of the record.
 Each datefield has this structure:
 .RS
 .sp