Re: [cc65] CBM units

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2010-02-03 18:29:08
Hi!

On Wed, Feb 03, 2010 at 05:56:22PM +0100, Oliver Schmidt wrote:
> Thanks for your answer on my OT post :-)

It may not be mouse related, but it's definitely cc65 related.

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

8

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

The _curunit variable is part of the common CBM library, while the zeropage
variable is machine specific. And I'm not even sure that all CBM machines have
such a variable. This is of course nothing that prevents such a constructor,
it just complicates things. Which was probably the reason why the module that
defines _curunit does not also have such a constructor.

> Is there a way that a C64 user can leverage "a current unit"?

The kernal has no such thing. You have to specify a unit each time, a file is
loaded. On the C64 there is just a variable where the kernal remembers the
unit from the last LOAD. It is not used for anything else (CBM hackers: please
correct me if this is wrong).

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 Wed Feb 3 18:29:13 2010

This archive was generated by hypermail 2.1.8 : 2010-02-03 18:29:15 CET