Re: [cc65] Filenames for POSIX functins on CBM targets

From: A.Fachat <fachat1web.de>
Date: 2012-08-12 18:27:12
Looking at the whole discussion, I am getting more and more to the conclusion that open() should probably just pass that name directly to the os. That call would use the current / last used device.
The system then should have something like "listdevices()" to get all/available devices and a "chdev()" to change the device used by open() - maybe just changing the _curunit variable underneath in a cbm impl.

I consider POSIX some kind of common denominator, far from being optimal - and all Op. Systems I know besides *nixes have some kind of device spec in their file addressing.

The approach above would allow to run posix programs cross platform on a single device - and using the two proposed functions can even change the device in a cc65 specific, but still 6502-cross platform way.

Iirc I had even used that approach in my lib6502 definition some time ago... (see my web site)

A "listdevices()" call would then return somthing like
"tape", "disk8",... on one platform, or in another platform like "1", "3", "8", or "a:", "c:" on again another. Selecting them should be done by menu, or fron cmdline (to not hardcode a platform this way, yet this is easier to change than different ":" device separators in a file name.)

Ok, those were my final words on this...

André
-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Aug 12 18:28:03 2012

This archive was generated by hypermail 2.1.8 : 2012-08-12 18:28:06 CEST