272
Comparison Instructions
Section 3-7
Operand Specifications
Description
BCMP2(502) compares the source data (S) to the ranges defined by pairs of
lower and upper limit values in the comparison block. If S is within any of
these ranges (inclusive of the upper and lower limits), the corresponding bits
in the result words (R to R+15 max.) are turned ON. The rest of the bits in R
will be turned OFF.
The number of ranges is determined by the value N set in the lower byte of B.
N can be between 0 and 255. The upper byte of B must be 00 hex.
Number of Ranges
The number of ranges in the comparison block is set in the first word of the
block. Up to 256 ranges can be set.
Area
S
B
R
CIO Area
CIO 0000 to CIO 6143
Work Area
W000 to W511
Holding Bit Area
H000 to H511
Auxiliary Bit Area
A000 to A959
A448 to A959
Timer Area
T0000 to T4095
Counter Area
C0000 to C4095
DM Area
D00000 to D32767
EM Area without bank
---
EM Area with bank
---
Indirect DM/EM
addresses in binary
@ D00000 to @ D32767
Indirect DM/EM
addresses in BCD
*D00000 to *D32767
Constants
#0000 to #FFFF
(binary)
---
Data Registers
DR0 to DR15
---
Index Registers
---
Indirect addressing
using Index Registers
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
B+1
B+3
B+5
B+31
B+33
B+35
B+37
B+2N+1
S
B
B+2
B+4
B+6
B+32
B+34
B+36
B+38
B+2N+2
0
1
2
15
0
1
2
R
Bit
Bit
:
:
:
:
Result words
R+1
Comparison ranges
Comparison block
0
7
8
15
Source data
Range 0 value A
Range 1 value A
Range 2 value A
Range 15 value A
00 hex
Last range
"N"
N: 00 to FF hex (0 to 255)
Range 0 value B
Range 1 value B
Range 2 value B
Range 15 value B
In range: ON
Not in range: OFF
Ranges
Range 16 value A
Range 17 value A
Range 18 value A
Range N value A
Range 16 value B
Range 17 value B
Range 18 value B
Range N value B
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...