HLASM Language Reference
HLASM Language Reference HLASM Language Reference
GBLA, GBLB, and GBLC Instructions GBLA, GBLB, and GBLC Instructions Use the GBLA, GBLB, and GBLC instructions to declare the global SETA, SETB, and SETC symbols you need. The SETA, SETB, and SETC symbols are assigned the initial values of 0, 0, and null character string, respectively. ┌─,───────────────┐ ►►──┬─────────────────┬──┬─GBLA─┬─── ▼ ─variable_symbol─┴─────────────►◄ └─sequence_symbol─┘ ├─GBLB─┤ └─GBLC─┘ sequence_symbol is a sequence symbol. variable_symbol is a variable symbol, with or without the leading ampersand (&). These instructions can be used anywhere in the body of a macro definition or in the open code portion of a source module. Any variable symbols declared in the operand field have a global scope. They can be used as SET symbols anywhere after the pertinent GBLA, GBLB, or GBLC instructions. However, they can be used only within those parts of a program in which they have been declared as global SET symbols; that is, in any macro definition and in open code. The assembler assigns an initial value to the SET symbol only when it processes the first GBLA, GBLB, or GBLC instruction in which the symbol appears. Later GBLA, GBLB, or GBLC instructions do not reassign an initial value to the SET symbol. Multiple GBLx statements can declare the same variable symbol so long as only one declaration for a given symbol is encountered during the expansion of a macro. The following rules apply to the global SET variable symbol: Within a macro definition, it must not be the same as any symbolic parameter declared in the prototype statement. It must not be the same as any local variable symbol declared within the same local scope. The same variable symbol must not be declared or used as two different types of global SET symbol; for example, as a SETA or SETB symbol. A global SET symbol should not begin with &SYS because these characters are used for system variable symbols. Subscripted Global SET Symbols A global subscripted SET symbol is declared by the GBLA, GBLB, or GBLC instruction. 344 HLASM V1R5 Language Reference
LCLA, LCLB, and LCLC Instructions ┌─,────────────────────────┐ ►►──┬─────────────────┬──┬─GBLA─┬─── ▼ variable_symbol(dimension) ┴────►◄ └─sequence_symbol─┘ ├─GBLB─┤ └─GBLC─┘ sequence_symbol is a sequence symbol. variable_symbol is a variable symbol, with or without the leading ampersand (&). dimension is the dimension of the array. It must be an unsigned, decimal, self-defining term greater than zero. Example: GBLA &GA(25),&GA1(15) There is no limit on the maximum subscript allowed. Also, the limit specified in the global declaration (GBLx) can be exceeded. The dimension shows the number of SET variables associated with the subscripted SET symbol. The assembler assigns an initial value to every variable in the array thus declared. Notes: 1. Global arrays are assigned initial values only by the first global declaration processed, in which a global subscripted SET symbol appears. 2. A subscripted global SET symbol can be used only if the declaration has a subscript, which represents a dimension; an unsubscripted global SET symbol can be used only if the declaration had no subscript, except for a number attribute reference to the name of a dimensioned SET symbol. Alternative Format for GBLx Statements The assembler permits the alternative statement format for GBLx instructions: Cont. GBLA &GLOBAL_SYMBOL_FOR_DC_GEN, X &LOOP_CONTRL_A, X &VALUE_PASSED_TO_FIDO, X &VALUE_RETURNED_FROM_FIDO LCLA, LCLB, and LCLC Instructions Use the LCLA, LCLB, and LCLC instructions to declare the local SETA, SETB, and SETC symbols you need. The SETA, SETB, and SETC symbols are assigned the initial values of 0, 0, and null character string, respectively. ┌─,───────────────┐ ►►──┬─────────────────┬──┬─LCLA─┬─── ▼ ─variable_symbol─┴─────────────►◄ └─sequence_symbol─┘ ├─LCLB─┤ └─LCLC─┘ Chapter 9. How to Write Conditional Assembly Instructions 345
- Page 314 and 315: &SYSTERM_DSN System Variable Symbol
- Page 316 and 317: &SYSTIME System Variable Symbol Not
- Page 318 and 319: Macro Instruction Format sequence_s
- Page 320 and 321: Macro Instruction Format Operand En
- Page 322 and 323: Macro Instruction Format When you n
- Page 324 and 325: Sublists in Operands the order in w
- Page 326 and 327: Sublists in Operands &SYSLIST( n,m)
- Page 328 and 329: Values in Operands Notes: 1. Spaces
- Page 330 and 331: Values in Operands Parentheses In m
- Page 332 and 333: Inner and Outer Macro Instructions
- Page 334 and 335: Levels of Macro Call Nesting When t
- Page 336 and 337: Levels of Macro Call Nesting System
- Page 338 and 339: How to Write Conditional Assembly I
- Page 340 and 341: SET Symbols SET Symbol Specificatio
- Page 342 and 343: SET Symbols Figure 86 (Page 3 of 3)
- Page 344 and 345: Data Attributes this example indica
- Page 346 and 347: Data Attributes variable_symbol is
- Page 348 and 349: Data Attributes The value of an att
- Page 350 and 351: Data Attributes The following attri
- Page 352 and 353: Data Attributes Assembler gives a t
- Page 354 and 355: Data Attributes The scale attribute
- Page 356 and 357: Data Attributes Number Attribute (N
- Page 358 and 359: Data Attributes The operation code
- Page 360 and 361: Lookahead MACRO &NAME MOVE &TO,&FRO
- Page 362 and 363: Open Code Sequence Symbols The cond
- Page 366 and 367: LCLA, LCLB, and LCLC Instructions s
- Page 368 and 369: SETA Instruction expression is an a
- Page 370 and 371: SETA Instruction | The logical-exp
- Page 372 and 373: SETA Instruction | Figure 99 (Page
- Page 374 and 375: SETA Instruction | The result of C2
- Page 376 and 377: SETA Instruction NOT Format: Logica
- Page 378 and 379: SETA Instruction | X2A Name Operati
- Page 380 and 381: SETA Instruction In evaluating the
- Page 382 and 383: SETB Instruction Any expression tha
- Page 384 and 385: SETB Instruction ┌─────
- Page 386 and 387: SETB Instruction | ISDEC | Format:
- Page 388 and 389: SETB Instruction The two comparands
- Page 390 and 391: SETC Instruction Notes: 1. The asse
- Page 392 and 393: Figure 103. Substring Notation in C
- Page 394 and 395: Loc Object Code Addr1 Addr2 Stmt So
- Page 396 and 397: | B2C('111111') has value '3' | B2C
- Page 398 and 399: | Output: D2B('decstring') converts
- Page 400 and 401: SIGNED Format: Logical-expression,
- Page 402 and 403: | X2D('') has value '+' | X2D('91')
- Page 404 and 405: Concatenation of strings containing
- Page 406 and 407: MACRO &NAME MOVE &TO,&FROM LCLC &PR
- Page 408 and 409: SETAF Instruction Alternative State
- Page 410 and 411: Branching Branching You can control
- Page 412 and 413: AGO Instruction The extended AIF in
GBLA, GBLB, and GBLC Instructions<br />
GBLA, GBLB, and GBLC Instructions<br />
Use the GBLA, GBLB, and GBLC instructions to declare the global SETA, SETB,<br />
and SETC symbols you need. The SETA, SETB, and SETC symbols are assigned<br />
the initial values of 0, 0, and null character string, respectively.<br />
┌─,───────────────┐<br />
►►──┬─────────────────┬──┬─GBLA─┬─── ▼ ─variable_symbol─┴─────────────►◄<br />
└─sequence_symbol─┘<br />
├─GBLB─┤<br />
└─GBLC─┘<br />
sequence_symbol<br />
is a sequence symbol.<br />
variable_symbol<br />
is a variable symbol, with or without the leading ampersand (&).<br />
These instructions can be used anywhere in the body of a macro definition or in the<br />
open code portion of a source module.<br />
Any variable symbols declared in the operand field have a global scope. They can<br />
be used as SET symbols anywhere after the pertinent GBLA, GBLB, or GBLC<br />
instructions. However, they can be used only within those parts of a program in<br />
which they have been declared as global SET symbols; that is, in any macro<br />
definition and in open code.<br />
The assembler assigns an initial value to the SET symbol only when it processes<br />
the first GBLA, GBLB, or GBLC instruction in which the symbol appears. Later<br />
GBLA, GBLB, or GBLC instructions do not reassign an initial value to the SET<br />
symbol.<br />
Multiple GBLx statements can declare the same variable symbol so long as only<br />
one declaration for a given symbol is encountered during the expansion of a macro.<br />
The following rules apply to the global SET variable symbol:<br />
Within a macro definition, it must not be the same as any symbolic parameter<br />
declared in the prototype statement.<br />
It must not be the same as any local variable symbol declared within the same<br />
local scope.<br />
The same variable symbol must not be declared or used as two different types<br />
of global SET symbol; for example, as a SETA or SETB symbol.<br />
A global SET symbol should not begin with &SYS because these characters are<br />
used for system variable symbols.<br />
Subscripted Global SET Symbols<br />
A global subscripted SET symbol is declared by the GBLA, GBLB, or GBLC<br />
instruction.<br />
344 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>