Simplest (practical) file system?

From: Dwight K. Elvey <dwightk.elvey_at_amd.com>
Date: Mon Jul 28 12:00:01 2003

>From: "ben franchuk" <bfranchuk_at_jetnet.ab.ca>
>
>Bob Shannon wrote:
>> What is the simplest usable disk file system to implement?
>>
>> More specifically, if your going to write a disk file system from
>> scratch, what would be the easiest way to implement
>> some basic file system functionality?
>>
>> How did some of the very early DOS systems allocate disk space in the
>> days before FAT tables, etc?
>>
>> Just how simply can this be done?
>>
>>
>
>Use the whole disk ... block by block ... FIG FORTH worked this way.
>

Hi
 On one of my Forth setups, I wrote a word that would
take the first number on a line of text in some block and
then use that number as the next block to bring up. This
way I'll edit a number of blocks as an index of the rest
of the text/code on the disk. I could then pass this number
on to words like LOAD, INDEX or EDIT. This made a simple
directory setup with a method for accessing portions
of the disk as different types of data. I'd place this
word as a single key stroke in my editor so that I could
use this word or just maintain the directory. I made it
a rule to put both the starting block and the last block
in the directory entry. This directory would look something
like:

10 25 EDIT comments
26 29 ASSEMBLER
2A 2B PROGRAMMER

 Although, it kept the block numbers in ASCII, the time
to convert to machine numbers is a small portion of the
overall access time. Keeping the numbers as HEX values
means that the conversion routines can be optimized
for simpler processor and still be in a human readable
format.
 I'd intended to add words that would maintain disk space
but so far, I've just maintained things by hand. Still,
one can see that with just a few extra words added, one can
do a reasonable OS without the need for a true FAT. Adding
words like a DELETE and a GARBAGE collector would make
a reasonable disk OS.
 I did add a search words to my directory setup. This way
I could find the EDITor fast if it was on some other
block of my simple directory.
 The advantage of just starting with simple blocks is that
one can expand it over time to even deal with sequential
files ( what most consider random length streamy file ).
 At first, one can keep even the editor simple by having
fixed length text lines, as a Forth block system does.
A block is 1024 bytes. When displayed as text, it is
a fixed chunk of 16 lines of 64 characters.
Dwight
Received on Mon Jul 28 2003 - 12:00:01 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:36:06 BST