Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!mailrus!husc6!bbn!uwmcsd1!marque!studsys!jetzer From: jetzer@studsys.mu.edu (jetzer) Newsgroups: comp.sys.apple Subject: Re: READ /RAM CATALOG IN APPLESOFT Message-ID: <133@studsys.mu.edu> Date: 17 Apr 88 19:58:07 GMT References: <8804152230.aa12184@SMOKE.BRL.ARPA> Organization: Marquette University - Milwaukee, Wisconsin Lines: 33 Summary: /RAM bug 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 prevent it? > The program looks like this: > 100 D$=CHR$(4): PRINT D$"OPEN/RAM,TDIR" > 110 PRINT D$"READ/RAM" > 120 INPUT S1$ : INPUT S2$ : INPUT S3$ : INPUT S4$ > 130 I=1 > 140 INPUT F$(I) : IF F$(I)<>"" THEN I=I+1 : GOTO 140 > 150 INPUT BLOCKS$ > 160 PRINT D$"CLOSE" This is a bug in the ProDOS /RAM driver, which has existed since the birth of ProDOS. It has something to do with the fact that, in order to maximize storage space and avoid conflicts with certain memory locations in aux mem, the first blocks (volume directory, bitmap, etc) are non-standard. A more thorough discussion of this is presented in the November 1986 issue of NIBBLE magazine. A fix for this is also included, but it's a program that has to be run every time you boot. Don't you hate line counters? ??????? -- Mike Jetzer "If you can't be right, be forceful"