Table of Contents        Previous topic       Next topic       

CROSS ASSEMBLER->Assembler Macros->Dummy Arguments

The above example illustrates two arguments, R5 and @R1, being passed to the macro.  During macro expansion, the first argument R5 replaces the dummy argument \0 and the second argument replaces the dummy argument \1.

Up to 36 arguments are allowed.  The first 10 arguments replace dummy arguments \0 to \9 and the remaining 26 arguments replace dummy arguments \A to \Z. (Alphabetic dummy arguments are case insensitive with \a being the same as \A etc.).  

Macro calls can be nested within each other and the arguments of nested macro calls may contain dummy arguments.  

A macro definition cannot be nested within another macro definition.

As the above example illustrates, the arguments following the macro call are separated from each other by commas.  

Null arguments (ie blank arguments) can be generated by either including nothing between the comma separators or by writing fewer arguments than the dummy arguments.  

Arguments that contain a comma or a space must be enclosed in parentheses. The parentheses are discarded so if you want true parentheses at each end of the argument then you should use double parentheses.