[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ewen Wannop's ProDOS Directory Info



In <20040219034144.11576.00002170@mb-m12.aol.com> Michael J. Mahon wrote:
 
> Perhaps the designers were simply hinting at the maximum
> size they expected for _any_ directory, by enforcing it for
> the Volume Directory.  Linked-list searches on disk are not
> a very efficient data organization for directory lookups.
> 
> A fixed-size directory of four contiguous blocks allows for
> a lookup routine to read the entire directory in as a single I/0
> (or at least, without having to seek), then search in the buffer.

A think you're likely right with your last statement. Whereas DOS was 
stored on the disk as a nice easy-to-load set of complete tracks at the 
start of the disk, with ProDOS the OS is stored in a file which can be 
anywhere on the disk. The only restriction is that the directory entry 
has to be in the root directory.

So the code stored in the boot blocks has to be able to find the OS file 
and load it into memory, and this code has to fit into just two blocks. 
Apple's original boot code would load PRODOS if it was booted on an 
Apple II, or SOS.KERNEL on an Apple III. Most formatting programs, 
including later ones from Apple, dropped the Apple III support. On these 
disks the boot code fits in just the first boot block, or less than 512 
bytes. It's hardly suprising they wanted the root directory to be in a 
fixed location!

-- 
Roger Johnstone, Invercargill, New Zealand

Apple II - FutureCop:LAPD - iMac Game Wizard
http://homepages.ihug.co.nz/~rojaws/
________________________________________________________________________
Real programmers don't document. If it was hard to write, it should be
hard to understand.