Re: [cc65] $ba

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-10-11 22:18:50


On Sat, Oct 11, 2003 at 10:07:02PM +0200, carlos wrote:
> > In cc65 there is a variable called _curunit which is actually $ba.

This is wrong. __curunit (which is the assembler name) and $ba are different
and this is probably the reason for the effects you see.

> After i start a cc65 program it holds the value zero. Before it was 8 or the
> number i set it to.
> After i make a diskaccess with cc65 the value is 8 again, suddenly.

I don't know why $ba is zero after start of a program (the cc65 runtime does
not clear it), but it is clear that it will have the value 8 later, since this
is the default value for _curunit. open() uses SETLFS to transfer _curunit
into $ba, so both are equal after opening a file. 

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz_at_musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-10-11 22:18:58 CEST