CP/M 1.4 disc formats

CP/M 1.4 was designed to work with 8" 250k discs. Thus a CP/M 1.4 disc will be laid out in the following way:
 77 tracks in total;

 26 128-byte sectors per track, software skewed;

  2 reserved tracks;

  2 1k directory blocks, giving 64 directory entries;

240 1k data blocks, numbered 2-241.

The skew table reads:
1,7,13,19,25,5,11,17,23,3,9,15,21,2,8,14,20,26,6,12,18,24,4,10,16,22

The reserved tracks will contain an image of CP/M 1.4, used when the system is rebooted. It can therefore be deduced that CP/M 1.4 fits in 6.5k.

CP/M 1.4 directory

The CP/M 1.4 directory only has one type of entry:
SS F1 F2 F3 F4 F5 F6 F7 F8 T1 T2 T3 EX S1 S2 RC   .FILENAMETYP....

AL AL AL AL AL AL AL AL AL AL AL AL AL AL AL AL   ................



SS = Status.   0  => File exists

             0E5h => File deleted

              80h => File exists and is hidden. This feature was undocumented

                    and does not exist in later versions of CP/M.

Fn - filename

Tn - filetype. The characters used for these are 7-bit ASCII.

EX = Extent counter. If a file grows above 16k, then it will have multiple

    directory entries. The first entry has EX=0, the second has EX=1 etc.

    EX ranges from 0 to 31, thus allowing files up to 512k. CP/M 1.4 only

    allows 256k discs anyway.

S1 - reserved, set to 0.

S2 - reserved, set to 0.

RC - Number of records (1 record=128 bytes) used in this extent. If it is

    80h, this extent is full and there may be another one on the disc. File

    lengths are only saved to the nearest 128 bytes.

AL - Allocation. Each AL is the number of a 1k block on the disc. If an AL

    number is zero, that section of the file has no storage allocated to it

    (ie it does not exist). For example, a 3k file might have allocation

    5,6,8,0,0.... - the first 1k is in block 5, the second in block 6, the

    third in block 8.




Valid XHTML 1.0!