Re: [cc65] .global vs .export vs what i really need :)

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2009-10-29 21:34:44
On Mon, Oct 26, 2009 at 10:30:48AM +0100, Ullrich von Bassewitz wrote:
> > oh sure, i understand that ... the question is if you wont do it because of
> > lack of time/interest/priorities (which is both perfectly understandable) -
> > or if you are generally against it (there might be a good reason to not do it
> > afterall). the latter should be discussed - and if in doubt i can (and will)
> > create a patch for the assembler (but i have no interest in doing that if it
> > wont be included afterwards =)).
>
> I'm not general against it and I do already have an idea how it could
> integrate nicely into the existing syntax. But please let me finish a few
> other things first. And remind me if I'm going to forget it :-)

I've added the necessary changes to the assembler in the head branch. You can
now use fully scoped symbol names for labels, constants or variable symbols.
But beware, this may have really strange side effects.

Examples:

.proc   foo
        bar     = $4321
        ::bar   = $1234         ; Place symbol bar into the global scope
        jsr     bar             ; Calls to $4321
        jsr     baz             ; Calls $5A5A
.endproc

.proc   bam
        foo::baz := $5A5A       ; Introduce symbol baz into scope foo
.endproc

.proc
        jsr     foo::bam        ; Beware: Calls global bam
.endproc

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 Thu Oct 29 21:39:36 2009

This archive was generated by hypermail 2.1.8 : 2009-10-29 21:39:38 CET