.macro
.endm

The syntax for a macro definition is:
<macro_name> .macro [<symbol> [, <symbol> [, <symbol> ...]]]
.endm
Macros can call themselves recursively
e.g.

foo     .macro  arg1, arg2, arg3, arg4

        .if     STR(arg1) != ""
        foo     arg2, arg3, arg4
        .db     arg1
        .endif

        .endm
this macro will reverse the argument list supplied to it
i.e.
        foo     1, 2, 3, 4

will produce

        .db     4
        .db     3
        .db     2
        .db     1