|
The type attribute has a value of a single alphabetic character
that shows the type of data represented by: - An ordinary symbol
- A macro instruction operand
- A SET symbol
- A literal
- A system variable symbol
The type attribute can change during an assembly. The lookahead
search might assign one attribute, whereas the symbol table at the
end of the assembly might display another.
The type attribute reference can be used in the operand field of
a SETC instruction or as one of the values used for comparison in
the operand field of a SETB or AIF instruction.
The type attribute can also be specified outside conditional assembly
instructions. Then, the type attribute value is not used for conditional
assembly processing, but is used as a value at assembly time.
The following letters are used for the type attribute of data represented
by ordinary symbols and outer macro instruction operands that are
symbols that name DC or DS statements. - A
- A-, J-type address constant, implied length, aligned (also CXD
instruction label)
- B
- Binary constant
- C
- Character constant
- D
- Long floating-point constant, implicit length, aligned
- E
- Short floating-point constant, implicit length, aligned
- F
- Fullword fixed-point constant, implicit length, aligned
- G
- Fixed-point constant, explicit length
- H
- Halfword fixed-point constant, implicit length, aligned
- K
- Floating-point constant, explicit length
- L
- Extended floating-point constant, implicit length, aligned
- P
- Packed decimal constant
- Q
- Q-type address constant, implicit length, aligned
- R
- A-, S-, Q-, J-, R-, V-, or Y-type address constant, explicit length
- S
- S-type address constant, implicit length, aligned
- V
- R-, V-type address constant, implicit length, aligned
- X
- Hexadecimal constant
- Y
- Y-type address constant, implicit length, aligned
- Z
- Zoned decimal constant
- @
- Graphic (G) constant
When a literal is specified as the name field on a macro call instruction,
and if the literal has previously been used in a machine instruction,
the type attribute of the literal is the same as for data represented
by ordinary symbols or outer macro instructions operands.
The following letters are used for the type attribute of data represented
by ordinary symbols (and outer macro instruction operands that are
symbols) that name statements other than DC or DS statements, or that
appear in the operand field of an EXTRN or WXTRN statement: - I
- Machine instruction
- J
- Control section name
- M
- The name field on a macro instruction, when the name field is:
- A valid symbol not previously defined
- A valid literal not previously defined
- T
- Identified as an external symbol by EXTRN instruction
- W
- CCW, CCW0, or CCW1 instruction
- $
- Identified as an external symbol by WXTRN instruction
The following letter is used for the type attribute of data represented
by inner and outer macro instruction operands only: - O
- Omitted operand (has a value of a null character string). Such
an operand need not be a null string: a macro operand such as (,,) has
a null first suboperand.
The following attribute is used for the type attribute of the value
of variable symbols: - N
- The value is numeric
The following letter is used for symbols or macro instruction operands
that cannot be assigned any of the above letters: - U
- Undefined, unknown, or unassigned
The common use of the U
type attribute is to describe a valid
symbol that has not been assigned any of the type attribute values
described above. If the assembler is not able to determine what the
named symbol represents, it also assigns the U type attribute. Thus,
the U type attribute can mean undefined, or unknown,
or unassigned at the time of the reference. Consider the following
macro definition: Name Operation Operand
macro
MAC1 &op1,&op2
&A setc T'&op1
&B setc T'&op2
DC C'&A' DC containing type attribute for op1
DC C'&B' DC containing type attribute for op2
mend
When the macro MAC1 is
called in Figure 1, neither of the operands
has previously been defined, however GOOD_SYMBOL is
a valid symbol name, whereas ?BAD_SYMBOL? is not
a valid symbol name. The type attribute for both operands is U,
meaning GOOD_SYMBOL is undefined, and ?BAD_SYMBOL? is
unknown. Figure 1. Undefined
and unknown type attributes000000 00000 00004 8 a csect
9 mac1 GOOD_SYMBOL,?BAD_SYMBOL?
000000 E4 10+ DC C'U' DC containing type attribute for op1
000001 E4 11+ DC C'U' DC containing type attribute for op2
12 end
When the macro MAC1 is called in Figure 2, GOOD_SYMBOL is a
valid symbol name, and has been defined in the DC instruction at statement
12. ?BAD_SYMBOL? is a not valid symbol name, and
the assembler issues an error message at statement 13. The type attribute
for GOOD_SYMBOL is C, meaning that
the symbol represents a character constant. The type attribute for ?BAD_SYMBOL? is U,
meaning that the type is unknown. Figure 2. Unknown type attribute for invalid symbol000000 00000 00006 8 a csect
9 mac1 GOOD_SYMBOL,?BAD_SYMBOL?
000000 C3 10+ DC C'C' DC containing type attribute for op1
000001 E4 11+ DC C'U' DC containing type attribute for op2
000002 A9 12 GOOD_SYMBOL dc cl1'z'
000003 A9 13 ?BAD_SYMBOL? dc cl1'z'
** ASMA147E Symbol too long, or first character not a letter - ?BAD_SYMBOL?
14 end
The type attribute value U, meaning undefined, unknown,
or unassigned, is assigned to the following: - Ordinary symbols used as labels:
- For the LTORG instruction
- For the EQU instruction without a third operand
- For DC and DS statements that contain variable symbols, for example, U1 DC &X'1'
- That are defined more than once, even though only one instance
of the label is generated due to conditional assembly statements.
A lookahead scan for attributes of a symbol might encounter more than
one occurrence of a symbol, in which case the assembler cannot yet
tell which statements will be generated. In such cases, type attribute
U is assigned. At a later time, when the symbol has been generated,
its type attribute is changed to the correct value for the type of
statement it names.
- SETC variable symbols that have a value other than a null character
string or the name of an instruction that can be referred to be a
type attribute reference
- System variable symbols except:
- &SYSDATC, &SYSM_HSEV, &SYSM_SEV, &SYSNDX, &SYSNEST, &SYSOPT_DBCS, &SYSOPT_RENT, &SYSOPT_XOBJECT,
and &SYSSTMT, which always have a type attribute value of N
- Some other character type system variable symbols can be assigned
the value of a null string, in which case they have a type attribute
value of O
- Macro instruction operands that specify a literal that is not
a duplicate of a literal used in a machine instruction
- Inner macro instruction operands that are ordinary symbols
Notes: - Ordinary symbols used in the name field of an EQU instruction
have the type attribute value U. However, the third operand of an
EQU instruction can be used explicitly to assign a type attribute
value to the symbol in the name field.
- The type attribute of a sublist is set to the same value as the
type attribute of the first element of the sublist.
- High Level Assembler and earlier assemblers treat the type attribute
differently:
|