Path: utzoo!censor!geac!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!julius.cs.uiuc.edu!apple!agate!ucbvax!PSUVM.PSU.EDU!ART100 From: ART100@PSUVM.PSU.EDU ("Andy Tefft 725-1344", 814) Newsgroups: comp.sys.apple2 Subject: Re: Applesoft problem: finding the end of a text file Message-ID: <9101160415.AA11360@apple.com> Date: 16 Jan 91 04:15:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 21 Under Prodos, you almost don't NEED to use the "read" command to read text files. You have a lot of room as a programmer to read files under prodos which you didn't have in dos 3.3. I can think of two solutions: 1). read in chunks of the file using BLOAD with the TTXT parameter. You can use the B and L parameters to identify which sections to read in. You can then go through and parse out the info. Kind of a pain for variable length records though. 2) (I haven't done one of these in a long time...) write your own read command. Would be quite simple with a couple of mli calls... you could even use an & command to allow some parameters. You could set a string to the filename to use, then in assembly you would put this string in the pathname buffer to do your mli calls. With a proper setting of newline read mode, you can read one line at a time. Also this routine would check for the eof condition and return this info to your program either in some memory location or a variable. Well, of course, it may just be simpler to use an onerr goto.