micro8fs

In memory FS for all queues stored. Also used by programs for heap memory. Programs are loaded from disk into blocks. Possibility for mount points to CF card.

  • 256 blocks in FAT table
  • 64 bytes per block
  • Max FS size 16kb
  • 8 bytes per file entry, 8 files per block
  • 6 byte filename, 1 byte flags, 1 byte start block
  • Flags: 2 bit type, x bits driver id (mounts)
  • Type: file, dir, buffer node

Increasing the nr blocks at least doubles the FAT table as it needs a 16 bit block id. Also increases the dir entry record as start block id needs 16 bits. Doubling the block size doubles the FS size but increases unused space for small queue sizes. Also means that functions can't be bigger than 64 bytes as they need to fit into a single block due to jumps and calls.

Scan directory block

  • Turn block id into address by multiplying by block size and adding to base addr
  • Jump by 8 byte chunks
  • Check filename 6 bytes against desired
  • If matched return the block id and type
  • If not found check the value of block table for this block
  • If it's a valid block id then move to that and repeat

Walk directory

  • Block 0 is the root dir
  • Scan block for file
  • [ ] * If found check it's a dir and repeat

Create a new file

  • Walk the path until the dir block is found