Directives Reference

7.2.1GBLA, GBLL, and GBLS

The GBLA directive declares a global arithmetic variable, and initializes its value to 0.

The GBLL directive declares a global logical variable, and initializes its value to {FALSE}.

The GBLS directive declares a global string variable and initializes its value to a null string, "".

Syntax

<gblx> variable

where:

<gblx>

is one of GBLA, GBLL, or GBLS.

variable is the name of the variable. variable must be unique amongst symbols within a source file.

Usage

Using one of these directives for a variable that is already defined re-initializes the variable to the same values given above.

The scope of the variable is limited to the source file that contains it.

Set the value of the variable with a SETA, SETL, or SETS directive (see SETA, SETL, and SETS on page 7-7).

See LCLA, LCLL, and LCLS on page 7-6 for information on declaring local variables.

Global variables can also be set with the -predefineassembler command-line option. See Command syntax on page 3-2 for more information.

7-4

Copyright © 2000, 2001 ARM Limited. All rights reserved.

ARM DUI 0068B

Page 286
Image 286
ARM VERSION 1.2 manual GBLA, GBLL, and Gbls, Syntax