Re: [cc65] Apple2 Libraries - Current status of file io ?

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2004-07-29 09:24:35
On Wed, Jul 28, 2004 at 10:23:08AM -0400, jim wrote:
> Long story short - there is not too much that is common - most of the
> code is setting up the function call.

From your words, and what Oliver said, it sounds like another Apple target
would be needed.

> I don't allow the STDIO to be remapped - it's possible.  How should the
> tty be represented ?
> "/dev/tty" ?  I don't want to make a Apple II Unix with dev inodes and
> such on the disk -  the disks are too small for standard Apple II's.  I
> can see using /dev/tty and /dev/stty0, ...
> Cygwin uses "CONIN$" "CONOUT$"

The representation of a tty is system dependent. The most common use of being
able to reopen the standard file descriptors would be to redirect standard
output into a file, so while I wouldn't say it's required, it's a nice feature
that is actually of some use.

> There has to be some way to allow the code to select the "right" device
> on reading or writing.  Which leads to a device table.

I don't think that it is necessary to allow opening devices as files. This
would just add a lot of code and won't really help, because the actual
read/write operations for most devices are platform dependent (joystick,
clock, ...).

If you really want to allow opening the console, my suggestion would be to
check for an empty filename. Opening a file with an empty name for reading
opens the keyboard, opening this file for writing opens the screen. This is a
convention that could be easily understood and can work on all platforms that
support it.

> Would it be possible to implement the new loadable driver idea with the
> disk ?

Maybe, but you get chicken and egg problem. If your disk access routines are
in a loadable driver, how are you going to load this driver?

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu, 29 Jul 2004 09:24:35 +0200

This archive was generated by hypermail 2.1.8 : 2004-07-29 09:24:47 CEST