assembler macros
2012-01-23 by Steven Hodge
Is there some restriction about using a macro parameter in a label? The following code will not work. It gives an "undefined symbol: usart0_Init" error: .MACRO _USART_INIT usart@0_Init: .... code using @0 parameter ............ .ENDMACRO ..... call usart0_Init ..... _USART_INIT 0 ..... But by simply excluding the entry point label from the macro definition it does work: usart0_Init: .MACRO _USART_INIT .... code using @0 parameter ............ .ENDMACRO ..... call usart0_Init ..... _USART_INIT 0 ..... It gives the same result in either AVR Studio 4 or 5. Thanks, Steve