|Non-Confidential||PDF version||ARM 100069_0608_00_en|
|Home > armasm Command-line Options > --predefine "directive"|
Instructs armasm to pre-execute one of the
You must enclose
in quotes, for example:
armasm --cpu=8-A.64 --predefine "VariableName SETA 20" inputfile.s
armasm also executes a corresponding
GBLA directive to define the variable before setting its value.
The variable name is case-sensitive. The variables defined using the command line are global to armasm source files specified on the command line.
Be aware of the following:
The command-line interface of your system might require you to enter special character
combinations, such as
\", to include strings in
. Alternatively, you can use
--via to include a
--predefine argument. The command-line interface does not alter
--predefine is not equivalent to the compiler option
--predefine defines a
global variable whereas
-D defines a macro that
the C preprocessor expands.
Although you can use predefined global variables in combination with assembly control
directives, for example
ELSE to control
conditional assembly, they are not intended to provide the same functionality as the C
preprocessor in armasm. If you require this functionality, ARM recommends you use
the compiler to pre-process your assembly code.