[Coco] Re: Re: Re: Disk Basic and 512 byte block floppies.

Brett K. Heath hcmth019 at csun.edu
Thu Jan 22 20:37:42 EST 2004



On Wed, 21 Jan 2004 KnudsenMJ at aol.com wrote:

> In a message dated 1/21/04 6:39:18 PM Eastern Standard Time,
> hcmth019 at csun.edu writes:
>
> > Each directory entry contained the name of the file, the user number for
> >  this file, the sequential number of the current entry in the list of
> >  entries for this file, various other housekeeping info, and a list of up
> >  to 16 allocation blocks associated with this entry. If this was the last
> >  entry for this file then it would also include information about how many
> >  allocation blocks and how many bytes in the last allocation block listed
> >  would actually be used.
>
> OK, maybe it was these directory blocks that were link-listed together.  I
> know there was something that was linked to the next one, etc., and this was
> probably it.
> Thanks, Mike K.

I'm still going from memory here but I don't think so Mike. There may have
been a variant that used a linked list somewhere but in general the CPM
directory was preallocated at a fixed size and location. Entries also were
of fixed and uniform size and consisted of a 32 byte field containing name
and file info followed by a 32 byte field of allocation block numbers. If
a file grew beyond what could be allocated within one entry then an
additional entry for that file would be created wherever there was space
in the directory. Entries were not linked, the OS had to read the entire
directory, pick out those pertaining to the file of interest, and then
order them according to the sequence numbers stored in the entries (not
unlike the way TCP reconstructs files).

I suppose it's possible that while dealing with a particular file the BDOS
maintained internal pointers (or offsets) to keep track of which directory
entry was the next one for that file, and there are indeed three bytes in
each entry reserved for internal use by BDOS, but the directory structure
itself didn't use links.

Brett K. Heath
PS As you may gather I spent a fair amount of time working with CPM
directory details.





More information about the Coco mailing list