5.8.37. GBLA directive

The GBLA directive declares and initializes a global arithmetic variable. The range of values that arithmetic variables may take is the same as that of numeric expressions. See Numeric expressions.


The syntax of GBLA is:

GBLA variable-name



is the name of the arithmetic variable. variable-name mustbe unique amongst symbols within a source file.

variable-name is initialized to 0.


Using GBLA for a variable that is already defined re-initializes the variable to 0. The scope of the variable is limited to the source file that contains it.

Set the value of the variable with the SETA directive. See SETA directive.

See also LCLA directive for information on setting local arithmetic variables.

Global variables can also be set with the -predefine assembler command-line option. Refer to Command syntax for more information.


			GBLA		objectsize				; declare the variable name
objectsize			SETA		0xff				; set its value
			%		objectsize				; quote the variable
Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0041C