Hello, I have a weird problem (bug?) with macro expansion while compiling with avrasm2.exe. I'm not sure whether I'm just doing something wrong, or it is working as intended, or it's a bug.
Problem: if there is a number in symbol name, before the macro parameter reference, compilation ends with an error.
Example:
.equ foo1bar2 =0 .macro testmacro ldi r16,foo1@0 .endmacro testmacro bar2
compilation ends with error: bar2: Unknown instruction or macro.
.equ foo1bar2 =0 .macro testmacro ldi r16,foo1bar@0 .endmacro testmacro 2
compilation ends with error: syntax error, unexpected INTEGER.
.equ foo1bar2 =0 .macro testmacro ldi r16,exp2(foo1@0) .endmacro testmacro bar2
compilation ends with error: syntax error, unexpected SYMBOL.
Everything works just fine if there is macro parameter reference before the number:
.equ foo1bar2 =0 .macro testmacro ldi r16,f@1o1@0 .endmacro testmacro bar2,o
Assembly complete, 0 errors. 0 warnings
Same thing occurs if you try it with labels instead of symbols.
Any help will be appreciated.
Sorry about lack of code segments, code editor just didn't want to start, may edit it later if I find out how.
Edit: fixed code segments, it worked while editing.