On Sun, 27 Jul 2003, Patrick Rigney wrote:
In Apple
ProDOS, the file entry in the directory points to either the
first block of the file (if the file is only one block in length) or a
block that contains a list of all the blocks the file uses. This is still
simple but elegant.
Is the file size limited to the number of blocks that can be represented in
a single map block, or does it allow multiple map blocks? If the latter,
how does it chain them? --Patrick
It allows multiple map blocks. The directory entry indicates what type of
file it is. The smallest is a seed (points to the file's single block),
then a sapling (points to the file's block allocation map), then a tree
(points to the file's block allocation map block list). This is from
memory so the seed/sapling/tree designation may be wrong, but that's the
gist of it. I think this scheme allows for a file of up to 32MB in size.
BTW: a block in ProDOS is 512 bytes (2 256-byte sectors).
For a tree, the directory entry points to a block which is a list of all
the allocation map blocks for that file. So the allocation map block list
can point to up to 256 allocation map blocks, and each allocation map
block can point to up to 256 blocks (2 bytes are used to store a block
number).
It's fairly sophisticated for an 8-bit operating system.
--
Sellam Ismail Vintage Computer Festival
------------------------------------------------------------------------------
International Man of Intrigue and Danger
http://www.vintage.org
* Old computing resources for business and academia at
www.VintageTech.com *