267
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Comparison Instructions
3
MCMP
MCMP
Applicable Program Areas
Operands
z Operand Specifications
Instruction Mnemonic Variations
Function
code
Function
MULTIPLE COMPARE MCMP @MCMP 019
Compares 16 consecutive words with another 16
consecutive words and turns ON the correspond-
ing bit in the result word where the contents of the
words are not equal.
Symbol
MCMP
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or
transition programs
Usage OK OK OK OK OK OK
Operand Description Data type Size
S1 First word of set 1 WORD 16
S2 First word of set 2 WORD 16
R Result word UINT 1
S
1
: First word of set 1 R: Result word
Note Specifies the beginning of the first 16-word range. S
1
and S
1
+ 15 and S
2
and S
2
+
15 must be in the same data area.
S
2
: First word of set 2
Area
Word addresses
Indirect
DM/EM
addresses
Con-
stants
Registers
TK CF
Pulse
bits
TR
bits
CIO WR HR AR T C DM EM
@DM
@EM
*DM
*EM
DR IR
Indirect
using IR
S1, S2
OK OK OK OK OK OK OK OK OK OK ---
---
--- OK --- --- --- ---
R OK
MCMP(019)
S
1
S
2
R
S1: First word of set 1
S2: First word of set 2
R: Result word
S1
S1+1
S1+15
Comparison data 0
Comparison data 1
to
Comparison data 15
15 014
R
1
Comparison result for S
1
and S
2
Comparison result for S
1
+1 and S
2
+1
Comparison result for S
1
+14 and S
2
+14
Comparison result for S
1
+15 and S
2
+15
S2
S2+1
S2+15
Comparison data 0
Comparison data 1
Comparison data 15
to