You copied the Doc URL to your clipboard.

21.63 SETA, SETL, and SETS

The SETA, SETL, and SETS directives set the value of a local or global variable.


variable setx expr



is the name of a variable declared by a GBLA, GBLL, GBLS, LCLA, LCLL, or LCLS directive.


is one of SETA, SETL, or SETS.


is an expression that is:

  • Numeric, for SETA.

  • Logical, for SETL.

  • String, for SETS.


The SETA directive sets the value of a local or global arithmetic variable.

The SETL directive sets the value of a local or global logical variable.

The SETS directive sets the value of a local or global string variable.

You must declare variable using a global or local declaration directive before using one of these directives.

You can also predefine variable names on the command line.


The value you can specify using a SETA directive is limited to 32 bits. If you exceed this limit, the assembler reports an error. A possible workaround in A64 code is to use an EQU directive instead of SETA, although EQU defines a constant, whereas GBLA and SETA define a variable.

For example, replace the following code:

                        GBLA    MyAddress      MyAddress         SETA    0x0000008000000000


      MyAddress         EQU     0x0000008000000000      


                GBLA    VersionNumberVersionNumber   SETA    21                GBLL    DebugDebug           SETL    {TRUE}                GBLS    VersionStringVersionString   SETS    "Version 1.0"