To pass text including commas as a single macro argument, the Assembler supports a special syntax. This grouping starts with the [? prefix and ends with the ?] suffix. If the [? or ?] patterns occur inside of the argument text, they have to be in pairs. Alternatively, escape brackets, question marks and backward slashes with a backward slash as prefix.
MyMacro: MACRO DC \1 ENDM MyMacro1: MACRO \1 ENDM
The following listing shows the macro calls with rather complicated arguments:
MyMacro [?$10, $56?] MyMacro [?"\[?"?] MyMacro1 [?MyMacro [?$10, $56?]?] MyMacro1 [?MyMacro \[?$10, $56\?]?]
These macro calls expand to the following listing:
DC $10, $56 DC "[?" DC $10, $56 DC $10, $56
The Macro Assembler does also supports for compatibility with previous version's macro grouping with an angle bracket syntax, as in the following listing:
MyMacro <$10, $56>
However, this old syntax is ambiguous as < and > are also used as compare operators. For example, the following code does not produce the expected result:
MyMacro <1 > 2, 2 > 3> ; Wrong!
Because of this the old angle brace syntax should be avoided in new code. There is also and option to disable it explicitly.
See also the -CMacBrackets: Square brackets for macro arguments grouping and the -CMacAngBrack: Angle brackets for grouping Macro Arguments assembler options.