Discussion:
TEXT FILE Internal Data from DOS 3.3 or Prodos question.
(too old to reply)
Tom Porter
2018-02-02 01:53:43 UTC
Permalink
Raw Message
Here is a slightly weird question. When a person creates a TEXT file, is there any identifying byte in memory to tell you how large the TEXT file is before it is closed. DOS 3.3 is more of interest here. Say, while the file is open, you can check how many sectors large it is during processing. Thanks.
D Finnigan
2018-02-02 03:44:37 UTC
Permalink
Raw Message
Post by Tom Porter
Here is a slightly weird question. When a person creates a TEXT file, is
there any identifying byte in memory to tell you how large the TEXT file
is
before it is closed. DOS 3.3 is more of interest here. Say, while the
file is open, you can check how many sectors large it is during
processing.
Thanks.
A sector count for each file is stored in the catalog. Read over Appendix C
of the DOS 3.3 manual for all the gory details.
I am Rob
2018-02-02 04:20:18 UTC
Permalink
Raw Message
Post by Tom Porter
Here is a slightly weird question. When a person creates a TEXT file, is there any identifying byte in memory to tell you how large the TEXT file is before it is closed. DOS 3.3 is more of interest here. Say, while the file is open, you can check how many sectors large it is during processing. Thanks.
For Prodos, you just call the MLI command GetEOF (Get End Of File), using the reference number of the file that is open.

With Dos3.3, There has to be a running tally somewhere. The file size has to be calculated somehow before the file is saved.
qkumba
2018-02-02 06:08:42 UTC
Permalink
Raw Message
The DOS File Manager can give you this information. When you open the file, you specify a page to hold the track/sector list. It is updated as you go along. Just scan it for the first double-zero, and you'll know how many sectors it holds.
Loading...