Omron CJ2 CPU UNIT SOFTWARE User Manual page 500

Cj2 cpu unit software
Hide thumbs Also See for CJ2 CPU UNIT SOFTWARE:
Table of Contents

Advertisement

Appendices
Instruction
Mnemonic
MULTIPLE
MCMP
019
COMPARE
@MCMP
TABLE COM-
TCMP
085
PARE
@TCMP
UNSIGNED
BCMP
068
BLOCK COM-
@BCMP
PARE
EXPANDED
BCMP2
502
BLOCK COM-
@BCMP2
PARE
AREA RANGE
ZCP
088
COMPARE
A-16
Code
Symbol/Operand
MCMP(019)
S
1
S
2
R
S
: 1st word of
1
set 1
S
: 1st word of
2
set 2
R: Result word
TCMP(085)
S
T
R
S: Source data
T: 1st word of
table
R: Result word
BCMP(068)
S
T
R
S: Source data
T: 1st word of
table
R: Result word
BCMP2(502)
S
T
R
S: Source data
T: 1st word of
block
R: Result word
ZCP(088)
CD
LL
UL
CD: Compare
data (1 word)
LL: Lower limit of
range
UL: Upper limit of
range
Function
Compares 16 consecutive words with another 16
consecutive words and turns ON the corresponding bit
in the result word where the contents of the words are
not equal.
Comparison
Compares the source data to the contents of 16 words
and turns ON the corresponding bit in the result word
when the contents are equal.
Comparison
Compares the source data to 16 ranges (defined by 16
lower limits and 16 upper limits) and turns ON the
corresponding bit in the result word when the source data
is within the range.
Ranges
Lower limit
T
to
T+1
T+2
to
T+3
Source data
S
to
T+29
T+28
T+30
to
T+31
Compares the source data to up to 256 ranges (defined by
upper and lower limits) and turns ON the corresponding bit in
the result word when the source data is within a range.
T
N
n=255 max.
T+1
Range 0 A
Range 0 B
T+3
Range 1 A
Range 1 B
Source data
S
T+2N+1
Range N A
Range N B
Note: A can be less than
or equal to B or
greater the B.
Compares the 16-bit unsigned binary value in CD (word con-
tents or constant) to the range defined by LL and UL and out-
puts the results to the Arithmetic Flags in the Auxiliary Area.
Location
Output
R
0: Words
are
equal.
1: Words
aren't
equal.
Output
R
1: Data
are
equal.
0: Data
aren't
Output
1: In range
0: Not in range
Upper limit
R
0
1
14
15
Output
1: In range
0: Not in range
D
Bit
T+2
0
T+4
1
D+15 max.
T+2N+2
Output
CJ2 CPU Unit Software User's Manual
Execution
condition
Required
Required
Required
Required
Required

Advertisement

Table of Contents
loading

Table of Contents