[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ProDOS/Applesoft file ?'s...
- Subject: Re: ProDOS/Applesoft file ?'s...
- From: nparker@cie-2.uoregon.edu (Neil Parker)
- Date: 1996/10/09
- Newsgroups: comp.sys.apple2
- Organization: University of Oregon Campus Information Exchange
- References: <53f834$oo4@login.freenet.columbus.oh.us>
In article <53f834$oo4@login.freenet.columbus.oh.us>
dalloff@freenet.columbus.oh.us (Dave Althoff) writes:
>
>Two questions about text file handling under ProDOS and BASIC.SYSTEM...
>
>I'm fairly well experienced with text file handling under DOS 3.3; just
>wondering about some differences with ProDOS:
>
>1) Has the APPEND command been fixed? I mean, can I safely APPEND to a
>file, or should I continue with my usual workarounds?
Yes, APPEND has been fixed.
ProDOS keeps an end-of-file pointer in the directory, so all it has to do
to APPEND correctly is get the EOF pointer, and move the current-position
pointer (or "mark") to that position. Pretty easy to do, and pretty hard to
get wrong.
But DOS 3.3 doesn't store an EOF pointer anywhere, so the EOF position has
to be found by "brute force," reading every byte of the file until a zero
byte appears, or there are no more sectors. It's an unexpectedly complex
process, and DOS 3.3 gets it wrong under certain bizarre situations.
>2) Can I specify a byte parameter greater than 32,767? Or do I still
>need to use the "long record" workaround?
I don't have my references handy at the moment, but if memory serves, the B
parameter allows values as high as 2^24-1 (16777215), so that you can use B
to position yourself anywhere within a file.
- Neil Parker
--
Neil Parker, nparker@{cie-2,cie}.uoregon.edu, http://cie-2.uoregon.edu/~nparker
"Evolution is vastly overrated." -- Ambassador Delenn, _Babylon_5_