237
Comparison Instructions Section 3-6
B+12 ≤ S ≤ B+13 Bit 06 of R
B+14
≤ S ≤ B+15 Bit 07 of R
B+16
≤ S ≤ B+17 Bit 08 of R
B+18
≤ S ≤ B+19 Bit 09 of R
B+20
≤ S ≤ B+21 Bit 10 of R
B+22
≤ S ≤ B+23 Bit 11 of R
B+24
≤ S ≤ B+25 Bit 12 of R
B+26
≤ S ≤ B+27 Bit 13 of R
B+28
≤ S ≤ B+29 Bit 14 of R
B+30
≤ S ≤ B+31 Bit 15 of R
For example, bit 00 of R is turned ON if S is within the first range (B
≤ S ≤
B+1), bit 01 of R is turned ON if S is within the second range (B+2 ≤ S ≤ B+3),
..., and bit 15 of R is turned ON if S is within the fifteenth range (B+30
≤ S ≤
B+31). All other bits in R are turned OFF.
Flags
Precautions An error will not occur if the lower limit is greater than the upper limit, but 0
(not within the range) will be output to the corresponding bit of R.
Example When CIO 0.00 is ON in the following example, BCMP(068) compares the
content of D100 with the 16 ranges defined in D200 to D231 (i.e., D200 and
D201, D202 and D203, etc.) and turns ON the corresponding bits in D300
when S is within the range or OFF when S is not within the range.
Name Label Operation
Error Flag ER OFF
Equals Flag = ON if the result word is 0000.
(S is not within any of the 16 ranges.)
OFF in all other cases.
R: D300
S: D100
0.00
D100
D200
D300
D200
D202
D204
D206
D208
D210
D212
D214
D216
D218
D220
D222
D224
D226
D228
D230
D201
D203
D205
D207
D209
D211
D213
D215
D217
D219
D221
D223
D225
D227
D229
D231
to
to
to
to
to
to
to
to
to
to
to
to
to
to
to
to