Concatenation \

Dummy arguments that are intended to be concatenated with other characters must be preceded by the backslash concatenation operator ( \) to separate them from the rest of the characters. The argument may precede or follow the adjoining text, but there must be no intervening blanks between the concatenation operator and the rest of the characters. To position an argument between two alphanumeric characters, place a backslash both before and after the argument name. For example, consider the macro definition in the following listing.

Listing: SWAP_REG Macro, Concatenation Dummy Argument
SWAP_REG   MACRO     REG1,REG2 ;swap REG1,REG2 using X0 as temp
           MOVE      R\REG1,X0

           MOVE      R\REG2,R\REG1

           MOVE      X0,R\REG2

           ENDM

If the macro in the above listing is called with the statement

  SWAP_REG 0,1  

then for the macro expansion, t he macro processor would substitute the character 0 for the dummy argument REG1 and the character 1 for the dummy argument REG2. The concatenation operator ( \) indicates to the macro processor that the substitution characters for the dummy arguments are to be concatenated in both cases with the character R. The resulting expansion of this macro call would be:

  MOVE R0,X0 MOVE R1,R0 MOVE X0,R1