22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SETA Instruction<br />

expression<br />

is an arithmetic expression evaluated as a signed 32-bit arithmetic value that is<br />

assigned to the SETA symbol in the name field. The minimum and maximum<br />

allowable values of the expression are −2 31 and +2 31 −1, respectively.<br />

Figure 97 defines an arithmetic expression.<br />

┌───────────┐<br />

│<br />

│<br />

│Arithmetic │<br />

│Expression │<br />

│<br />

│<br />

└─────┬─────┘<br />

│<br />

▼ Can be any of<br />

├────────────┬──────────┬────────────────────────────┬────────────────────┬──────────┐<br />

▼ ▼ ▼ ▼ ▼ ▼<br />

┌─────┴─────┐ ┌────┴────┐ ┌───┴───┬─────────┬───────┐ ┌────┴──────────────┐ ┌───┴────┐ ┌───┴────┐<br />

│Arithmetic │ │ (Arith. │ │ Arith.│ Binary │ Arith.│ │ Arithmetic-Valued │ │+Arith. │ │-Arith. │<br />

│Term │ │ Exp.) │ │ Exp. │ Operator│ Exp. │ │ Built-in Function │ │▲ Exp. │ │▲ Exp. │<br />

└─────┬─────┘ └─────────┘ └───────┴─────────┴───────┘ └───────────────────┘ └┼───────┘ └┼───────┘<br />

│<br />

└────┬─────┘<br />

▼ Can be any of<br />

│<br />

├─────────────┬─────────────┬─────────────┐<br />

unary operators<br />

▼ ▼ ▼ ▼<br />

┌─────┴─────┐ ┌─────┴─────┐ ┌─────┴─────┐ ┌─────┴─────┐<br />

│ │ │Predefined │ │ Self- │ │ │<br />

│ Variable │ │Absolute │ │ Defining │ │ Attribute │<br />

│ Symbol │ │Ordinary │ │ Term │ │ <strong>Reference</strong> │<br />

│ │ │Symbol │ │ │ │ │ Operators Allowed<br />

└───────────┘ └───────────┘ └───────────┘ └─────┬─────┘<br />

│ Unary: + Positive<br />

│<br />

– Negative<br />

│ Can<br />

▼ only be Binary: + Addition<br />

┌─────┴─────┐<br />

– Subtraction<br />

│ Length │ Multiplication<br />

│ Scale │ / Division<br />

│ Integer │<br />

│ Count │<br />

Arith. Exp. = Arithmetic Expression │ Number │<br />

│ Defined │<br />

└───────────┘<br />

Figure 97. Defining Arithmetic (SETA) Expressions<br />

Figure 98 shows the variable symbols that are allowed as terms in an arithmetic<br />

expression.<br />

Figure 98 (Page 1 of 2). Variable Symbols Allowed as Terms in Arithmetic Expressions<br />

Variable symbol Restrictions Example Valid value<br />

SETA None --- ---<br />

SETB None --- ---<br />

SETC<br />

Symbolic parameters<br />

Value must evaluate to an<br />

unsigned binary,<br />

hexadecimal or decimal<br />

self-defining term<br />

Value must be a<br />

self-defining term<br />

123 123<br />

&PARAM<br />

&SUBLIST(3)<br />

X'A1'<br />

C'Z'<br />

348 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!