

                             The Disk Doctor


    The ST Disk Structure:

       sector 0 is the boot track
       sectors 1 through 5 are the first copy
           of the File Allocation Table (FAT)
       sectors 6 through 10 are the second FAT copy
       sectors 11 through 17 are the directory
       the remainder of the disk is data space.

         On floppies, the boot track is 1 sector long, each FAT is 5
    sectors, the directory is 7 sectors. On a single-sided disk, this
    theoretically leaves 702 sectors for data, but the operating
    system seems to count somewhat less: when a disk is formatted, it
    shows only 698 sectors available. Double-sided floppies also have
    1 sector boot tracks, On at least one hard disk, the boot track is
    again 1 sector long, each FAT is 41 sectors and the root directory
    (the main directory or desktop) is 16 sectors. Other hard disk
    structures may vary.


    DIRECTORY STRUCTURE

         The root or main directory is in the seven consecutive
    sectors mentioned above. A subdirectory (a folder or path) is
    actually a file on the disk. While the root directory is limited
    in the maximum number of files it can take, since files need not
    be contiguous, a subdirectory is not thus limited.


         Each directory entry is 32 bytes long: there are 16 entries
    per sector, laid out so:


         file name          bytes 0-7
         extension          bytes 8-10
         attributes         byte 11
         reserved space     bytes 12-21
         time stamp         bytes 22-23
         date stamp         bytes 24-25
         starting cluster   bytes 26-27 (an integer)
         length (bytes)     bytes 28-31 (a 4-byte integer)

         File name is the part of the name before the period, eight
    bytes padded on the right with blanks if less than that in length.
    If the first byte in a name is zero, the entry is unused. If $E5
    (229 decimal), then the file has been erased. If the first 