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.

SETB Instruction<br />

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

│<br />

│<br />

│Logical │<br />

│Expression │<br />

│<br />

│<br />

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

│<br />

▼ Can be any of<br />

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

Logical Operators Allowed<br />

▼ ▼ ▼<br />

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

│ │ │ │ OR │ │ │ │ │ AND Union<br />

│ Logical │ │Logical │ OR NOT │ Logical │ │ NOT │Logical │ NOT Negation<br />

│ Term │ │Expression │ AND │ Term │ │ │Expression │ XOR Exclusive OR<br />

│ │ │ │ AND NOT │ │ │ │ │<br />

│ │ │ │ XOR │ │ │ │ │<br />

│ │ │ │ XOR NOT │ │ │ │ │<br />

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

│<br />

▼ Can be any of<br />

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

▼ ▼ ▼ ▼ ▼ ▼ ▼<br />

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

│ │ │ SETB │ │ │ │ │ │ │ │ Predefined│ │ │<br />

│ Logical │ │ Variable │ │Arithmetic│ │ │ │ 1 │ │ Absolute │ │ Logical │<br />

│ Relation │ │ Symbol │ │Value │ │ │ │ │ │ Ordinary │ │ Function │<br />

│ │ │ │ │ │ │ │ │ │ │ Symbol │ │ │<br />

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

│<br />

▼ Can be any of<br />

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

▼<br />

▼<br />

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

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

│ │ │ │<br />

│Arithmetic │<br />

│ Character │<br />

│Relation │ │ Relation │<br />

│ │ │ │<br />

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

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

│ │ Relational Operators Allowed<br />

▼ Which is<br />

▼ Which is<br />

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

│ │ EQ, NE │ │ │ │ EQ, NE │ │ NE Not equal<br />

│Arithmetic │ LE, LT │Arithmetic │ │ Character│ LE, LT │ Character│ LE Less than or equal<br />

│Comparand │ GE, GT │Comparand │ │ Comparand │ GE, GT │ Comparand │ LT Less than<br />

│ │ │ │ │ │ │ │ GE Greater than or equal<br />

└─────┬─────┴───────────┴───────────┘ └─────┬─────┴───────────┴───────────┘ GT Greater than<br />

│<br />

│<br />

▼ Which can be<br />

▼ Can be any of<br />

│<br />

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

│ ▼ ▼ ▼ ▼<br />

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

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

│ │ │ │ │ │ │ Type │ │Character │<br />

│Arithmetic │ │Character │ │ Substring │ │ Attribute │ │Exp. and │<br />

│Expression │ │Expression │ │ Notation │ │ <strong>Reference</strong> │ │Substring │<br />

│ │ │ │ │ │ │ │ │Notation │<br />

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

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

Notes:<br />

1. Outermost expression must be enclosed in parentheses in SETB and AIF instructions.<br />

2. Optional parentheses around terms and expressions at this level.<br />

| 3. Must be in the range 0 through 1024 characters.<br />

4. Must stand alone and not be enclosed in single quotation marks.<br />

Figure 101. Defining Logical Expressions<br />

Subscripted SETB Symbols<br />

The SETB symbol in the name field can be subscripted, but only if the same SETB<br />

symbol has been previously declared in a GBLB or LCLB instruction with an<br />

allowable dimension.<br />

The assembler assigns the binary value explicitly specified, or implicit in the logical<br />

expression present in the operand field, to the position in the declared array given<br />

by the value of the subscript. The subscript expression must not be 0 or have a<br />

negative value.<br />

364 <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!