[Coco] Curious DECB File o bytes
goosey at virgo.sdc.org
Sun Sep 9 03:21:58 EDT 2012
On Sat, Sep 08, 2012 at 09:52:21PM -0700, Stephen H. Fischer wrote:
> Can someone please describe the CP/M file system, it has disappeared from
> my memory.
> That may have been the model.
Leaving behind any machine-specific details...
First N tracks are always reserved for boot tracks.
Directory is usually 1 track long.
Rest of disk is data.
Sectors are grouped into clusters, usually 2K, 4K, or 8K long.
Cluster numbering can be 8 or 16 bits (machine-specific).
Clusters are numbered from the beginning of the directory.
A directory entry is 32 bytes long:
1 byte user number/deleted mark
8 byte filename
3 byte extension (permissions are encoded on the parity bits of the
1 byte extent number
2 bytes reserved for date stamp
1 byte extent size in sectors
16 bytes clusters used in extent
Since a single dir entry can only address 8 or 16 clusters, we have
this "extent" thing going on. The first Extent of a file is extent
0. If more clusters than the dir. entry can hold are used, another
dir. entry is used, marked extent 1. Loop.
And that's the entire filesystem. Things like free/allocated cluster
lists are only in machine memory and are very machine-specific.
File size is only to the even sector.
So actually, the CoCo's 8-bit FAT isn't very CP/M. I suspect it's
mostly a Microsoft thing (the Model 100's DVI -- which has a Microsoft
ROM -- uses a very similar FS.) with maybe a bit of TRS-DOS influence.
Comparison with the MSX-DOS filesystem might be interesting.
Willard Goosey goosey at sdc.org
Socorro, New Mexico, USA
I search my heart and find Cimmeria, land of Darkness and the Night.
-- R.E. Howard
More information about the Coco