| Home CBM ASCII-X BASIC C128 D64plus Disk BAM Fast Load File Sector Block Directory Header Physics Track Escape Codes Hardware PCxface PETSCII Pet2asc Futurama IBM PC-AT Contact Games Glossary Hall of fame Hall of shame Miscellaneous Privacy policy Programming Twisty puzzles |
The directory is a series of blocks which contain 8 file entries each (some may be unused). Each file entry contains a variety of information and uses 30 bytes:
Let's take a look at each of these parts.
This byte specifies the CBM file type in the lower 6 bits:
Bit 6 is set to indicate the file is "locked" (read-only). Bit 7 is set to indicate the file has been properly closed. A standard CBM directory listing will show a * by the file-type if it is not properly closed; these are known a "splat" files.
This points to the starting track and sector (first block) of the main file data. For GEOS VLIR files, it points to the VLIR table.
A filename may be up to 16 characters (bytes) long. Unused characters are filled with a "shifted space" = PETSCII code 160.
This points to the starting track and sector of either a REL file's side-sector table, or to the only block of a GEOS "info sector".
For RELative files, this byte indicates the record length (2 to 254 bytes). For GEOS files, it indicates the 'file structure': 0 is sequential and 1 is VLIR..
This byte indicates the type of GEOS file:
These five bytes are used by GEOS as a last-modified date/time stamp:
Notice the year is encoded as year - 1900. So byte 88 would appear for the year 1988 or byte 126 would appear for year 2026.
This two-byte value (stored little-endian) indicates the size of all streams in blocks (multiples of 254 bytes rounded up). For example, if the file contained 1024 bytes, that would be 1024/254 = 4.0135... → 5 blocks. For a standard PRG or SEQ file, use the number of blocks in the stream indicated by Main Link. For a GOES sequential-structure file, one would be added to account for the info block. For a REL file, you would add the number of blocks from Main Link to those from Other Link (other link typically has 1 to 6 blocks). For a GEOS VLIR file, one would need to add up each stream in the VLIR table, then add two: plus one for the VLIR table itself, and plus another one for the GEOS info block. © Hydrophilic.net, 2026 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||