Re: [cc65] Commodore file i/o (was: and another....)

Date view Thread view Subject view

From: Ullrich von Bassewitz (
Date: 2002-10-08 18:58:12

On Tue, Oct 08, 2002 at 06:43:31PM +0200, groepaz wrote:
> ??? please explain... it implements open/close/read/write basically,
> and also a ton of (dos/borland style) highlevel routines.

I cannot find anything named open, close, read or write in your sources.
However, there are some other functions like fs_printf(). And, assuming the
POSIX low level functions were available, these would not be needed, because
fprintf would work in this case.

> oh, and maybe that old version is missing certain bits aswell, i dont
> remember....been a while since i uploaded that one ,)

This may be the case, I don't know:-)

[loadable modules]
> does that mean dropping in open/read/close would do the trick?

All the stdio stuff is based on open/read/write/close. This means that having
these routines, fopen, fprintf, fread, fwrite and all others will
automagically start working. The later routines are not system dependent,
which is very nice in my eyes, because it minimizes the amount of platform
dependent code. And, it allows to port programs that use the POSIX interface
instead of the C file routines.

The current implementation of tgi_load() (the function that loads graphics
drivers into memory) calls cbm_load, but this is a hack, because cbm_load
is non standard and works only on CBMs. I will change that to use fopen, fread
and fclose, so it is usable with any platform that has file i/o.



Ullrich von Bassewitz                        
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.

Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-10-08 18:58:20 CEST