[cc65] CBM units (was: Question on 1351 mouse)

From: Oliver Schmidt <ol.sc1web.de>
Date: 2010-02-03 17:56:22
Hi Uz,

Thanks for your answer on my OT post :-)

> The CBMs don't allow unit specs in file names. They allow a drive
> specification, but this works only for dual drives (drive units that have two
> floppy disk drives). There have been proposals to add a unit spec to file
> names, but I didn't like the approach, since it does also have some drawbacks.

I remember - and agree.

> You can change the unit used by storing the unit number into the variable
> _curunit. There is also a zero page variable that holds the unit a program is
> loaded from. By fetching this value and storing it into _curunit, the program
> will by default use the unit it was loaded from.

What value does _curunit have if I don't set it?

From my current understanding it would be best if some C library
constructor would do what you describe. But as this isn't the case
what are the reasons?

Is there a way that a C64 user can leverage "a current unit"? It would
be i.e. desirable to have the unit 9 as current and then load a
program from unit 8 while the loaded program uses unit 9 by deafult as
it is the current unit. But by now I'm already presuming that I'm
totally wrong ;-)

Best, 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 Wed, 3 Feb 2010 17:56:22 +0100

This archive was generated by hypermail 2.1.8 : 2010-02-03 17:56:39 CET