[Coco] Disk Free Space
Robert Gault
robert.gault at att.net
Thu Dec 27 16:07:01 EST 2018
The caveat on counting $FFs is that a freshly formatted disk via Disk Basic has the entire sector
only $FFs. So, as explained in part in a previous message: 1) Know the number of tracks on the disk;
2) There are two granules per track excluding track 17, the directory and
[(total tracks)-1]*2=grans so (35-1)*2=68 grans/35Tdisk.
When something is stored on the disk, the gran table changes as described in the "Color Computer
Disk System Owner's Manual & Programming Guide". For a 35 track disk, you count the number of $FFs
in bytes 0-67 in track 17, sector 2. That is the number reported by the FREE(#) - "Returns the
number of free granules on the disk in the drive number you specify."
Robert
Arthur Flexser wrote:
> The free count is not directly stored anywhere on the disk. You need to
> count up how many of the values returned by Robert's program are equal to
> $FF. That's the number of free grans. Instead of printing each value as
> the program presently does, modify it to count the $FFs.
>
> Art
><snip>
More information about the Coco
mailing list