Re: [cc65] Fwd: RR-Devel:ca65 in 21 days

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2002-11-28 13:17:51


Hi!

On Thu, Nov 28, 2002 at 02:26:47AM +0100, Groepaz wrote:
> mayb UZ can tell us....

As far as I can tell, most things are not possible using ca65. However, the
stuff shown seems rather complex and the use of .reloc/.org in the macro
suggests to me that the user has problems with the concepts behind ca65. Which
leads me to the assumption that there may be a simpler solution to the
original problem. But I may also be wrong here.

> > - write Lo/Hi byte of * and the label __THIS_BANK__ to 3 seperate segments
> >     works fine too

I would advise not to use labels starting with two underscores, because these
may be used by some implementation detail. See the .LOCAL command in the docs
for an example.

> > - I switched the segment, but at the end of the macro the old value should
> >   be restored. But how do I read the name of the current segment?
> >     Should be like:
> >       temp_var = .current_segment
> >       ...switch segments around...
> >       .segment temp_var  or maybe   .segment .string(temp_var)

This sounds useful, but is not possible.

> > And another problem: I'm using label redefinition for a enum replacement or
> > passing args between two macros ( e.g. End_Blah need a value defined in
> > Start_Blah). How can I do this with ca65?

Depends somewhat on the application. One way would be to use a local scope
around the whole and just use normal symbols:

        .macro  Start   name, label
                .proc   name
                label   = 1
        .endmacro

        .macro  End     label
                .byte   label
                .endproc
        .endmacro

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 : 2002-11-28 13:17:57 CET