[cc65] ca65 syntax problems

Date view Thread view Subject view

From: Jason Duerstock (jason_at_cluephone.com)
Date: 2001-10-31 20:05:12


I am trying to write a macro to take a text string and convert it into 
bytes displayable by the Atari ANTIC chip.  The rules are as follow:

range	change
00-1f	+40
20-5f	-20
60-7f	0
80-9f	+40
a0-df	-20
e0-ff	0

I want StrAtasciiToANTIC to process the given string and change each 
character with the rules above.  I wrote the following macros to do this 
but I keep getting syntax errors.  What am I doing wrong?

Thanks

Jason

.macro  AtasciiToANTIC  Arg
        .if (Arg<$20)
                .byte (Arg+$40)
        .elseif (Arg<$60)
                .byte (Arg-$20)
        .elseif (Arg<$80)
                .byte Arg
        .elseif (Arg<$A0)
                .byte (Arg+$40)
        .elseif (Arg<$E0)
                .byte Arg-$20
        .else
                .byte Arg
        .endif
.endmacro

.macro  StrAtasciiToANTIC       Arg
        .repeat .strlen(Arg), I
        AtasciiToANTIC .strat(Arg, I)
        .endrep
.endmacro

	.org $8000
	.segment "BLAH"

	StrAtasciiToANTIC	"SELF TEST"

----------------------------------------------------------------------
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 : 2001-12-14 22:05:43 CET