Another way to define a macro is to use the #define directive. This will define a pre-processor style macro using a syntax that will be familiar to C programmers. Note that C pre-processor macros are complementary to the assembler's main MACRO...ENDM macro language.
Macro Definition Syntax: #define Directive shows the full syntax, and explains the syntax elements.
#define name [ ( parms) ] assembly_statement [ ; ] [ \ ] assembly_statement [ ; ] [ \ ] assembly_statement parms ::= parameter [ , parameter ]...
| Element | Description |
|---|---|
| name | Label that invokes the macro. |
| parameter | Operand the assembler passes to the macro. |
| assembly_statement | An assembly language statement. To extend the statement beyond the length of one physical line, type a backslash (\) at the end of a line, then continue the statement on the next line. To specify multiple statements on the same line, separate then with semicolon and backslash characters (;\). |