bdfs1m1cStructured Programming Macros

DCL-Declare

Use this macro to specify the attributes for symbols referred to in the IF, DO, CASE, and LET macros. These attributes remain in effect until they are changed by a subsequent DCL macro.

Format




symbol
is the label of a variable or constant that will be referred to in the structured programming macros (SPMs).

attribute
is one of the following types for the symbol being declared:

SIGNED
The attribute normally given to fullword (F) or halfword (H) symbols. The SIGNED attribute causes the field to be treated as containing a positive or negative fixed binary number whose high-order bit indicates the sign.

UNSIGNED
The attribute normally given to any symbol whose type is not a fullword (F), halfword (H), or character (C). The UNSIGNED attribute causes the field to be treated as containing a positive fixed binary number.

REGISTER
The attribute normally given to symbols defined to the assembler as follows:
    symbol  EQU  n

The REGISTER attribute causes the symbol to be treated as a general-purpose register using n as the register number.

CHARACTER
The attribute normally given to character (C) symbols. The CHARACTER attribute causes the field to be treated as a string of bytes.

If you do not specify an attribute for a symbol, the symbol is removed from the symbol table.

arithcon
is a decimal integer that represents the length of the symbol, in bytes, unless REGISTER is specified as the attribute. In that case, it is the general-purpose register number. If you do not specify arithcon, the length (L') defined to the assembler is used. This length (L') is not available at assembly time under some assemblers if the symbol is generated by a macro. If REGISTER is specified but the register number is not specified, the register defaults to the length of the symbol, or 1 if the symbol is an equate.

The value of the arithmetic constant is restricted by the attributes declared as follows:

Attribute
Value Range
 SIGNED 
1-4
 UNSIGNED 
1-4
 CHARACTER 
1-256
 REGISTER 
0-15

LIST=YES
prints all symbols that currently have their assembler attributes overridden with the DCL macro. The last attributes assigned are printed with the symbol.

WORK0=n
defines the first even-odd pair of general-purpose registers to be used by the SPMs. The value of n must be even. The registers are available for use in between macros but will be changed during macro processing.

WORK2=m
defines the second even-odd pair of general-purpose registers to be used by the structured programming macros. The value of m must be even and cannot be 0. The registers are available for use in between macros but may be changed during macro processing.

Entry Requirements

None.

Return Conditions

Control is returned to the next sequential instruction.

Programming Considerations

Examples

The following example shows several DCL macro statements.

          DCL     WORK0=8
          DCL     R2,REGISTER,2
          DCL     MY0CCT,UNSIGNED,2
          DCL     MY1CCT,SIGNED,2
          DCL     MY0TXT,CHARACTER,99
          DCL     EBW020,CHARACTER,4
          DCL     FRIEDT
          DCL     LIST=YES
 

Related Macros

DCLREG-Declare General Registers.