[cc65] ldax macro

From: MagerValp <MagerValp1cling.gu.se>
Date: 2004-09-30 13:29:26
I'm using the ldax macro from the ca65 docs:

	.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

and it dies with a weird error if you use an arg with parenthesis,
like so:

	ldax #(13)

test.s(5): Error: `,' expected
test.s(5): Error: `,' expected
test.s(5): Error: Syntax error
test.s(5): Error: `)' expected
test.s(5): Error: Unexpected trailing garbage characters

I can't find a way of telling what the assembler expands the macro
into (I tried with -l and -v), so I haven't been able to figure out
what's going on here.

-- 
    ___          .     .  .         .       . +  .         .      o   
  _|___|_   +   .  +     .     +         .  Per Olofsson, arkadspelare
    o-o    .      .     .   o         +          MagerValp@cling.gu.se
     -       +            +    .     http://www.cling.gu.se/~cl3polof/
----------------------------------------------------------------------
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 Sep 30 13:29:29 2004

This archive was generated by hypermail 2.1.8 : 2004-09-30 13:29:38 CEST