SETB instruction
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.
- variable_symbol
- Is a variable symbol.
A global variable symbol in the name field must have been previously declared as a SETB symbol in a GBLB instruction. Local SETB symbols need not be declared in an LCLB instruction. The assembler considers any undeclared variable symbol found in the name field of a SETB instruction as a local SET symbol. The variable symbol is assigned a type attribute value of N.
- binary_value
- Is a binary bit value specified as:
- A binary digit (0 or 1)
- A binary value enclosed in parentheses An arithmetic value enclosed in parentheses is allowed. This value can be represented by:
- An unsigned self-defining term
- A SETA symbol
- A previously defined ordinary symbol with an absolute value
- An attribute reference other than the type attribute reference.
- A logical expression enclosed in parentheses
A logical expression is evaluated to determine if it is true or false; the SETB symbol in the name field is then assigned the binary value 1 or 0, corresponding to true (1) or false (0). The assembler assigns the explicitly specified binary value (0 or 1) or the computed logical value (0 or 1) to the SETB symbol in the name field.

- Outermost expression must be enclosed in parentheses in SETB and AIF instructions.
- Optional parentheses around terms and expressions at this level.
- Must be in the range 0 through 1024 characters.
- Must stand alone and not be enclosed in apostrophes.
Rules for Coding Logical Expressions: The following is a summary of coding rules for logical expressions:
- A logical expression must not contain two logical terms in succession.
- A logical expression can contain two logical operators in succession; however, the only allowed combinations are OR NOT, XOR NOT and AND NOT. The two operators must be separated from each other by one or more spaces.
- Any logical term, relation, or inner logical expression can be optionally enclosed in parentheses.
- The relational and logical operators must be immediately preceded
and followed by at least one space, except when written
(NOT bexpr)
. - A logical expression can begin with the logical unary operator NOT.
- A logical expression can contain up to 18 logical operators. The relational and other operators used by the arithmetic and character expressions in relations do not count toward this total.
- Up to 255 levels of nested parentheses are allowed.
- Absolute ordinary symbols specified in logical expressions must be defined before the logical expression is encountered.
- The assembler determines the type of a logical relation by the first comparand. If the first comparand is a character expression that begins with an apostrophe, then the logical relation is a character relation, otherwise the assembler treats it as an arithmetic relation.