HLASM Language Reference

HLASM Language Reference HLASM Language Reference

faculty.cs.niu.edu
from faculty.cs.niu.edu More from this publisher
22.02.2015 Views

Data Attributes variable_symbol is a variable symbol that represents the data that possesses the attribute. literal is a literal that represents the data that possesses the attribute. A literal cannot be specified with the operation code attribute or count attribute. character_string is a character string that represents the operation code in the operation code attribute. Examples: T'SYMBOL L'&VAR K'&PARAM O'MVC S'=P'975.32' The assembler substitutes the value of the attribute for the attribute reference. | Reference to the count (K'), defined (D'), number (N'), operation code (O'), and | type (T') attributes can be used only in conditional assembly instructions or within | macro definitions. The length (L'), integer (I'), and scale (S') attribute references can be in conditional assembly instructions, machine instructions, assembler instructions, and the operands of macro instructions. | Attributes of Symbols and Expressions | Figure 88 shows attribute references (in the columns) and types of symbols (in the | rows). Each intersection shows whether (“Yes”) or not (“No”) you can validly apply | the attribute reference to that symbol type, or (in the case of SET symbols) to the | value of the symbol. Figure 88 (Page 1 of 2). Attributes and Related Symbols Symbols Specified Type T' Length L' Scale S' Integer I' Count K' Number N' Defined D' Operation Code O' In open code: Ordinary symbols Yes Yes Yes Yes No No Yes No System variable symbols with global scope Yes No No No Yes Yes No No | Literals Yes Yes Yes Yes No No Yes No 326 HLASM V1R5 Language Reference

Data Attributes Figure 88 (Page 2 of 2). Attributes and Related Symbols Symbols Specified Type T' Length L' Scale S' Integer I' Count K' Number N' Defined D' Operation Code O' In macro definitions: Ordinary symbols Yes Yes Yes Yes No No Yes No Symbolic parameters Yes Yes Yes Yes Yes Yes Yes Yes System variable symbols: &SYSLIST Yes Yes Yes Yes Yes Yes Yes No All others Yes No No No Yes Yes No No | Literals in Yes | macro instruction | operands Yes Yes Yes No No Yes No | The values of attribute references may be used in ordinary and conditional | assembly expressions, as shown in Figure 89. | Figure 89. Using Attribute Values | Symbols Type Length Scale Integer Count Number Defined Operation | Specified T' L' S' I' K' N' D' Code O' | In open code: SETB, SETA, SETA, SETA, SETA, SETA, SETA, SETB, | SET symbols SETC SETB SETB SETB SETB SETB SETB SETC | | In ordinary assembly: No Yes Yes Yes No No No No | In macro SETB, SETA, SETA, SETA, SETA, SETA, SETA, SETB, | definitions: SETC SETB SETB SETB SETB SETB SETB SETC | SET symbols Note: 1. Only in character relations. 2. Only in arithmetic relations. The value of an attribute for an ordinary symbol specified in an attribute reference comes from the item named by the symbol. The symbol must appear in the name field of an assembler or machine instruction, or in the operand field of an EXTRN or WXTRN instruction. The value of an attribute reference to an expression is the value of that attribute reference to its leftmost term. Notes: 1. You cannot refer to the names of instructions generated by conditional assembly substitution or macro generation until the instruction is generated. 2. If you use a symbol qualifier to qualify an ordinary symbol in an attribute reference, the qualifier is ignored. Chapter 9. How to Write Conditional Assembly Instructions 327

Data Attributes<br />

Figure 88 (Page 2 of 2). Attributes and Related Symbols<br />

Symbols<br />

Specified<br />

Type<br />

T'<br />

Length<br />

L'<br />

Scale<br />

S'<br />

Integer<br />

I'<br />

Count<br />

K'<br />

Number<br />

N'<br />

Defined<br />

D'<br />

Operation<br />

Code O'<br />

In macro<br />

definitions:<br />

Ordinary<br />

symbols<br />

Yes<br />

Yes<br />

Yes<br />

Yes<br />

No<br />

No<br />

Yes<br />

No<br />

Symbolic<br />

parameters<br />

Yes<br />

Yes<br />

Yes<br />

Yes<br />

Yes<br />

Yes<br />

Yes<br />

Yes<br />

System variable<br />

symbols:<br />

&SYSLIST<br />

Yes<br />

Yes<br />

Yes<br />

Yes<br />

Yes<br />

Yes<br />

Yes<br />

No<br />

All others<br />

Yes<br />

No<br />

No<br />

No<br />

Yes<br />

Yes<br />

No<br />

No<br />

| Literals in<br />

Yes<br />

| macro instruction<br />

| operands<br />

Yes<br />

Yes<br />

Yes<br />

No<br />

No<br />

Yes<br />

No<br />

| The values of attribute references may be used in ordinary and conditional<br />

| assembly expressions, as shown in Figure 89.<br />

| Figure 89. Using Attribute Values<br />

| Symbols<br />

Type Length Scale Integer Count Number Defined Operation<br />

| Specified<br />

T' L' S'<br />

I'<br />

K' N'<br />

D'<br />

Code O'<br />

| In open code:<br />

SETB, SETA, SETA, SETA, SETA, SETA, SETA, SETB,<br />

| SET symbols<br />

SETC SETB SETB SETB SETB SETB SETB SETC<br />

|<br />

| In ordinary assembly: No Yes Yes Yes No No<br />

No<br />

No<br />

| In macro<br />

SETB, SETA, SETA, SETA, SETA, SETA, SETA, SETB,<br />

| definitions:<br />

SETC SETB SETB SETB SETB SETB SETB SETC<br />

| SET symbols<br />

Note:<br />

1. Only in character relations.<br />

2. Only in arithmetic relations.<br />

The value of an attribute for an ordinary symbol specified in an attribute reference<br />

comes from the item named by the symbol. The symbol must appear in the name<br />

field of an assembler or machine instruction, or in the operand field of an EXTRN or<br />

WXTRN instruction.<br />

The value of an attribute reference to an expression is the value of that attribute<br />

reference to its leftmost term.<br />

Notes:<br />

1. You cannot refer to the names of instructions generated by conditional<br />

assembly substitution or macro generation until the instruction is generated.<br />

2. If you use a symbol qualifier to qualify an ordinary symbol in an attribute<br />

reference, the qualifier is ignored.<br />

Chapter 9. How to Write Conditional Assembly Instructions 327

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!