CBM DOS can't have zero-length files. *)
However, you can (try to) rename a file into itself and check the error channel, like thus:
Code: Select all
Unless there are other issues (like write protect on, or drive not ready, etc.), you either get 62,FILE NOT FOUND,00,00
or 63,FILE EXISTS,00,00
in DS$ ... which exactly match the information you want to know.
And this method also has the charm it works independent of CBM DOS file type.
*) actually your example would instead fail with files of one byte length, as EOF in ST already is signalled with the last byte sent