Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
SETB instruction HLASM Language Reference SC26-4940-06 |
|
Use the SETB instruction to assign a bit value to a SETB symbol. You can assign the bit values, 0 or 1, to a SETB symbol directly and use it as a switch. If you specify a logical (Boolean) expression in the operand field,
the assembler evaluates this expression to determine whether it is
true or false, and then assigns the value 1 or 0 to the SETB symbol.
You can use this computed value in condition tests or for substitution.
>>-variable_symbol--SETB--binary_value-------------------------><
Figure 1. Defining
logical expressions
┌───────────┐ │ │ │Logical¹ │ │Expression │ │ │ └─────┬─────┘ │ V Can be any of ├─────────────┬─────────────────────────────────────────────────┐ Logical Operators Allowed V V V ┌─────┴─────┐ ┌─────┴─────┬───────────┬───────────┐ ┌───────────┬─────┴─────┐ OR Intersection │ │ │ │ OR │ │ │ │ │ AND Union │ Logical² │ │Logical² │ OR NOT │ Logical │ │ NOT │Logical² │ NOT Negation │ Term │ │Expression │ AND │ Term │ │ │Expression │ XOR Exclusive OR │ │ │ │ AND NOT │ │ │ │ │ │ │ │ │ XOR │ │ │ │ │ │ │ │ │ XOR NOT │ │ │ │ │ └─────┬─────┘ └───────────┴───────────┴───────────┘ └───────────┴───────────┘ │ V Can be any of ├─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┐ V V V V V V V ┌─────┴─────┐ ┌─────┴─────┐ ┌─────┴─────┐ ┌─────┴─────┐ ┌─────┴─────┐ ┌─────┴─────┐ ┌─────┴─────┐ │ │ │ SETB² │ │ │ │ │ │ │ │ Predefined│ │ │ │ Logical² │ │ Variable │ │Arithmetic²│ │ 0² │ │ 1² │ │ Absolute │ │ Logical² │ │ Relation │ │ Symbol │ │Value │ │ │ │ │ │ Ordinary │ │ Function │ │ │ │ │ │ │ │ │ │ │ │ Symbol │ │ │ └─────┬─────┘ └───────────┘ └───────────┘ └───────────┘ └───────────┘ └───────────┘ └───────────┘ │ V Can be any of ├─────────────────────────────────────────┐ V V ┌─────┴─────┐ ┌─────┴─────┐ │ │ │ │ │Arithmetic │ │ Character │ │Relation │ │ Relation │ │ │ │ │ └─────┬─────┘ └─────┬─────┘ │ │ Relational Operators Allowed V Which is V Which is ┌─────┴─────┬───────────┬───────────┐ ┌─────┴─────┬───────────┬───────────┐ EQ Equal │ │ EQ, NE │ │ │ │ EQ, NE │ │ NE Not equal │Arithmetic │ LE, LT │Arithmetic │ │ Character³│ LE, LT │ Character³│ LE Less than or equal │Comparand │ GE, GT │Comparand │ │ Comparand │ GE, GT │ Comparand │ LT Less than │ │ │ │ │ │ │ │ GE Greater than or equal └─────┬─────┴───────────┴───────────┘ └─────┬─────┴───────────┴───────────┘ GT Greater than │ │ V Which can be V Can be any of │ ├─────────────┬─────────────┬──────────────────┐ │ V V V V ┌─────┴─────┐ ┌─────┴─────┐ ┌─────┴─────┐ ┌─────┴──────────┐ ┌─────┴─────┐ │ │ │ │ │ │ │ Type Attribute │ │Character │ │Arithmetic │ │Character │ │ Substring │ │ or Operation │ │Exp. and │ │Expression │ │Expression │ │ Notation │ │ Code │ │Substring │ │ │ │ │ │ │ │ Reference⁴ │ │Notation │ └───────────┘ └───────────┘ └───────────┘ └────────────────┘ └───────────┘ Notes:
Rules for Coding Logical Expressions: The following is a summary of coding rules for logical expressions:
|
Copyright IBM Corporation 1990, 2014
|