NOT
ANSI
The NOT instruction performs a logical NOT on the source and stores the result over the destination. It uses one of the following formats:
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
source1
Required. A previously defined Character String Variable, single character Literal, decimal constant, or equivalent {ctrl} character combined with the {dest} operand.
sep
Required. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.
dest1
Required. A previously defined Character String Variable that is NOTed with the {source} operand contains the results.
source2
Required. A previously defined INTEGER variable that is combined with the {dest} operand.
dest2
Required. A previously defined INTEGER that is combined with the {source} operand contains the results.
Flags Affected: EOS, ZERO
Note the following:
The {source} remains unchanged.
If the {source} operand is a character string variable, the source Form Pointed character is processed and the result is stored at the Form Pointed character in {dest}.
If the {source} operand is an INTEGER variable, the entire source integer field is processed and the result is placed in the destination integer field.
If either the source or destination is a Null String, the EOS Condition Flag is set.
If the result is zero, the ZERO Condition Flag is set.
The following truth table indicates the results of the operation on each bit:
|
Source |
Dest |
|
0 |
1 |
|
1 |
0 |
Any bit in the character may be manipulated.
Enhanced ARRAY processing is supported for the NOT instruction.
See Also: Example Code, AND, OR, TEST, XOR, Character String Instructions
![]() |