[cc65] CBM LFN Question

From: Oliver Schmidt <ol.sc1web.de>
Date: 2010-10-23 12:28:49
Hi,

So far I stayed successfully clear from using the cbm_xxx() file i/o
functions. However there's (still) no opendir() so I'm now about to
use cbm_opendir().

I found out easily enough that cbm_opendir() calls cbm_open() which
works "just like the BASIC comand OPEN". However surprisingly I'm
unable to find usable information on what those 'logical files' are
and how BASIC programmers are supposed to use them. The only thing I
see is that '1' is used typically in commands entered interactively.

Additionally I'm afraid that the cc65 C library and/or the POSIX file
i/o functions make certain assumptions about the way 'logical files'
are used. I've been peeking into the CBM C library source but I must
admit that I don't understand it - i.e. why the C library seems to use
'logical files' from '3' onwards.

My current guessing would lead me to trying 'logical filenumber' 12
because the C library starts with number 'logical filenumber' 3 and
has a maximum of 8 handles.

My current usecase doesn't require a filehandle from open() being
"active" while using cbm_opendir(). If it is however easy to archive
this interoperability by choosing the "right" 'logical filenumber' I'd
obviously do so...

It would be nice if someone could help me understanding these things better.

Thanks in advance,
Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Oct 23 12:28:58 2010

This archive was generated by hypermail 2.1.8 : 2010-10-23 12:29:02 CEST