Path: utzoo!mnetor!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!mailrus!ames!pacbell!att-ih!gargoyle!ddsw1!igloo!lazarus From: lazarus@igloo.UUCP (David Sugar) Newsgroups: comp.sys.apple Subject: Re: READ /RAM CATALOG IN APPLESOFT Message-ID: <580@igloo.UUCP> Date: 18 Apr 88 07:16:20 GMT References: <8804152230.aa12184@SMOKE.BRL.ARPA> Organization: igloo, Northbrook, IL Lines: 21 Summary: ProDOS /RAM volume In article <8804152230.aa12184@SMOKE.BRL.ARPA>, MEELISSE@HROEUR5.BITNET writes: > I have written a short BASIC program to read the contents of a ProDOS > directory and put it in a string array (see below). All works fine until I > try reading my /RAM disk... Just after the filenames have been read and > before the "Blocks free..." line should be read, I get an OUT OF DATA error > and the program stops executing. Why does this happen? Is there anything > I can do to preve There is a 'strange' bug in ProDOS. It always assumes a volume directory is 4 blocks long, even if, as in the case of the /ram volume, it is not. If a volume directory is less than the preset maximum, the next directory 'block' is all zero'd except for the backlink, which does point to the previous directory block. Every extra block after this is zero as well, including the link fields. A simple file dump program (not block editor) will show this parculiarity. It does also occur if you format 'regualr' ProDOS devices (3.5, 5 1/4, etc) with smaller directories (I created a utility awhile back that let me resize volume directories). Dave ..igloo!lazarus n