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

Re: ProDOS vs. Dos 3.3



Edhel Iaur, Esq. <edhel@LOSETHECAPITALWORDSapple2.com> wrote:

> On Sun, 18 Oct 1998 19:48:48 -0500, "Nathan Olson"
> <natolson@linkup.net> wrote:
> 
> >What are the pros/cons of running ProDOS vs Dos 3.3?
> 
> I won't repeat anything--I'll just add that the "cluster isze" of
> ProDOS is 512 bytes, whereas DOS 3.3's "cluster size" is only 256
> bytes.  This means that files stored on a DOS 3.3-formatted disk will
> take up a bit less space.

Not always.  The size tradeoff between DOS 3.3 and ProDOS files seesaws
back and forth according to the exact number of bytes in the file, and
the file type.

For any file up to 512 bytes long, ProDOS is either the same as DOS or
one sector better.

For files from 512 bytes to about 32K, ProDOS requires one or two
sectors more than DOS.

For larger files (up to 128K), ProDOS gains on DOS by one sector every
32K, so 96K to 128K files are always smaller in ProDOS.

For files between 128K and 160K, ProDOS requires the same number of
sectors or one more.

For anything larger than 160K, ProDOS is better.  DOS can't do much with
files this big anyway.


The above assumes a simple sequential access text file, and I'm ignoring
the zero terminator byte in DOS (which can be omitted if the file size
is an exact multiple of 256 bytes).

For a BASIC (A or I) or BINARY (B) file, DOS adds two bytes (A/I) or
four bytes (B) at the start of the first sector, to hold the file size
in bytes, and the load address for a binary file.  If the file size is
within two or four bytes of a multiple of 256 bytes, then the DOS file
will need an extra sector, pushing things more in favour of ProDOS.

An example of this is when saving the hi-res graphics screen as a memory
image.

If you use BSAVE FILE,A$2000,L$2000 then you get a 34 sector file under
DOS.  This consists of one sector for the track/sector list and 33
sectors for data, of which the last only contains four bytes.

If you use BSAVE FILE,A$2000,L$1FF8 (not saving the invisible final
eight bytes), you save a sector because the four extra bytes fit within
the 32nd data sector.

For ProDOS, you get a 17 block file (34 sectors) in either case.
(ProDOS stores the file length and load address in the directory entry,
not inside the file.)


Sparse files (e.g. random access text files) will vary depending on the
record size and distribution.  For small enough records which are widely
scattered, DOS will generally be more efficient.

-- 
David Empson
dempson@actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand