GBLA, GBLL, and GBLS
GBLS directives declare and initialize global variables.
is one of
is the name of the variable.
variablemust be unique among symbols within a source file.
GBLA directive declares a global
arithmetic variable, and initializes its value to 0.
GBLL directive declares a global
logical variable, and initializes its value to
GBLS directive declares a global
string variable and initializes its value to a null string,
Using one of these directives for a variable that is already defined re-initializes the variable.
The scope of the variable is limited to the source file that contains it.
Set the value of the variable with a
Global variables can also be set with the
The following example declares a variable
objectsize, sets the value of
0xFF, and then uses it
later in a
GBLA objectsize ; declare the variable name objectsize SETA 0xFF ; set its value . . ; other code . SPACE objectsize ; quote the variable
The following example shows how to declare and set a variable when you invoke
armasm. Use this when you want to set the value of a variable at
--pd is a synonym for
armasm --predefine "objectsize SETA 0xFF" sourcefile -o objectfile