|ARM Technical Support Knowledge Articles|
Applies to: AX51 Macro Assembler
Information in this article applies to:
I do not understand how to use the ! macro operator. There is no example in the manual.
The ! macro operator is used to literalize a macro parameter. It is usually used to pass delimiters. The following example shows how you can comment parts of macros by using the ! operator to pass a semicolon as a comment start.
?ID?SEG SEGMENT IDATA RSEG ?ID?SEG VAL0: DS 1 VAL1: DS 1 VAL2: DS 1 LD_ID MACRO Adr, Modi MOV R0,#Adr MOV A,@R0 Modi R0 ENDM ?PR?SEG SEGMENT CODE RSEG ?PR?SEG LD_ID VAL0, INC ; LOAD VAL0 and INC R0 ADD A,@R0 ; VAL1 LD_ID VAL2, DEC ; LOAD VAL0 and DEC R0 XRL A,@R0 ; VAL2 LD_ID VAL1, !; ; LOAD VAL1 and leave R0 unmodified ADD A,@R0 ; VAL1 END
Article last edited on: 2005-08-03 10:24:52
Did you find this article helpful? Yes No
How can we improve this article?