Re: [cc65] Question on 1351 mouse

From: Ullrich von Bassewitz <>
Date: 2010-02-03 17:40:57

On Wed, Feb 03, 2010 at 05:31:06PM +0100, Oliver Schmidt wrote:
> A example: Some Contiki-on-C64 complain about "my" programs being tied
> to drive #8. But the only thing I do is calling open(),read() and
> close(). In general I'd presume that there's a notion of a current
> drive that the end-user can manipulate to have "my" programs access
> that drive - but this doesn't seem to be the case. But unfortunately
> I've so little CBM knowhow that I can't answer to those complains.

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.
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.



Ullrich von Bassewitz                        
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Feb 3 17:41:03 2010

This archive was generated by hypermail 2.1.8 : 2010-02-03 17:41:04 CET