| |
Mathman Account closed
Registered: Jul 2008 Posts: 3 |
Number of sequential files open on 1541
Hi all,
the VIC-1541 manual states that five sequential files may be open at the same time, but is that really true? My experimentation gives that three is the maximum if one actual wants to read from those files. From my investigations, it seems like there are five buffers in the 1541, of which two are reserved for BAM + directory listing and only the remaining three are available for reading sequential files. Can anyone confirm if this theory is true?
Thanks. |
|
| |
Martin Piper
Registered: Nov 2007 Posts: 722 |
What's your test code? |
| |
Fungus
Registered: Sep 2002 Posts: 686 |
The buffers don't have anything to do with how many files can be open, they are used and purged as needed. Get the Inside Commodore DOS book from bombjack and check the size of the channel/file tables, it's probably five or six at most. I believe you can have only 1 file at a time open for writing, but several reading... however why you would want to have multiple files open if you are doing anything other than using REL files is the question. |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
I *think* (not sure) he uses them for byte-for-byte reading/writing, if that makes any difference. I suppose purging buffers may be a problem then? |
| |
Fungus
Registered: Sep 2002 Posts: 686 |
Just write a custom driver and then the limit is easier to expand I guess. |
| |
Mathman Account closed
Registered: Jul 2008 Posts: 3 |
Yes correct. I read byte-for-byte from several files, alternating between them.
It's not important enough that I would write a new driver. I am just interested in knowing if I understood correctly, why it does not work.
Also, why would one like to have a file open if it is not possible to read from it? |
| |
Fungus
Registered: Sep 2002 Posts: 686 |
you aren't switching context correctly then, don't use clrchn (it will close it). |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
also keep the command channel open all the time - closing it closes all files too |