 | Ax51 User's Guide |  |
|
|
| DEFINE Assembler Directive| Abbreviation | DF | | Arguments | One or more names (in accordance with the naming conventions of the C language) separated by commas. An optional value may be assigned to each name. | | Default | None. | | µVision | Options — A51 — Misc Controls. | | Description | The DEFINE directive defines C preprocessor symbols on the assembler command line. This is equivalent to using the #define directive in your program source code. You may use the #if, #ifdef, and #ifndef preprocessor directives to query names defined with the DEFINE directive. Defined names are copied exactly as they are entered and are case-sensitive. Each name may be assigned a value. Note - The DEFINE directive may be specified only on the command line. Use the C preprocessor #define directive to define symbols inside an assembler source file.
- The DEFINE directive may not be used to define preprocessor macros.
The C preprocessor processes the source text of a source file before it is actually assembled. This means that the DEFINE symbol can be used anywhere in the source code. For example DEFINE (check="15+5") replaces all symbols that have the name check with the text 15+5. | | See Also | RESET, SET | | Example |
A51 SAMPLE.ASM DEFINE (check=15, NoExtRam)
A51 MYPROG.ASM DF (X1="1+5")
|
|
|