5.8.39. GBLS directive

The GBLS directive declares and initializes a global string variable. The range of values that string variables may take is the same as that of string expressions. See String expressions.


The syntax of GBLS is:

GBLS variable-name



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

variable-name is initialized to a null string, "".


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

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

See LCLS directive for information on setting local string variables.

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


		GBLS		version				; declare the variable
version		SETS		"Version 1.0"				; set its value
		; code
		INFO		0,version				; use the variable
Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0041C