241
Comparison Instructions Section 3-6
When B+1 > B+2
If S
≤ B+2 and B+1 ≤ S, then bit 0 of R will turn ON,
If S
≤ B+4 and B+3 ≤ S, then bit 1 of R will turn ON,
If B+6
< S < B+5, then bit 2 of R will turn OFF, and
If B+8
< S < B+7, then bit 3 of R will turn OFF.
Results Storage Location
The results are output to corresponding bits in word R. If there are more than
16 comparison ranges, consecutive words following R will be used.The maxi-
mum number of result words is 16, i.e., m equals 0 to 15.
Flags
Example When CIO 0.00 is ON in the following example, BCMP2(502) compares the
content of CIO 1000 with the 24 ranges defined in D200 through D247 (N = 17
hex = 23 decimal, i.e., 24 ranges) and turns ON the corresponding bits in
CIO 2000 and CIO 2001 when S is within the range and OFF when S is not
within the range. For example, if the source data in CIO 1000 is in the range
defined by D201 and D202, then bit 00 of CIO 2000 is turned ON and if it in
not in the range, then bit 00 of CIO 2000 is turned OFF. Likewise, the source
data in CIO 1000 is compared to the ranges defined by D203 and D204, D247
and D248, and the other words in the comparison block, and bit 1 in
CIO 2000, bit 7 in CIO 2001, and the other bits in the result words are manip-
ulated according to the results of comparison.
15 014
Comparison result for
S and range 16m + 14
Comparison result for
S and range 16m + n
Comparison result for
S and range 16m
Comparison result for
S and ran