Re: [cc65] ldax macro

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2004-10-03 22:30:54
On Thu, Sep 30, 2004 at 01:55:50PM +0200, MagerValp wrote:
> Ah, that explains why it's been working fine before. However, with the
> new macro, ldax foo (absolute addressing) doesn't work unless you
> remove the {} around the arg.

That's because the docs are wrong:-) The curly braces as list terminators are
only supported where this is needed because parenthesis or commas would be
interpreted in a special way. This is not true for simple mnemonics, so the
curly braces outside the pseudo functions must go:

        .macro  ldax    arg
                .if (.match (.left (1, {arg}), #))
                    ; immediate mode
                    lda     #<(.right (.tcount ({arg})-1, {arg}))
                    ldx     #>(.right (.tcount ({arg})-1, {arg}))
                .else
                    ; assume absolute or zero page
                    lda     arg
                    ldx     1+(arg)
                .endif
        .endmacro

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 Sun Oct 3 22:30:59 2004

This archive was generated by hypermail 2.1.8 : 2004-10-03 22:31:07 CEST