Omron CP1E-N@@D@-@ Computer Hardware User Manual


 
2 Instructions
2-102
CP1E CPU Unit Instructions Reference Manual(W483)
Functioni
TCMP(085) compares the source data (S) to each of
the 16 words T through T+15 and turns ON the corre-
sponding bit in word R when the data are equal. Bit n
of R is turned ON if the content of T+n is equal to S
and it is turned OFF if they are not equal.
S is compared to the content of T and bit 00 of R is
turned ON if they are equal or OFF if they are not
equal, S is compared to the content of T+1 and bit 01
of R is turned ON if they are equal or OFF if they are
not equal, ..., and S is compared to the content of
T+15 and bit 15 of R is turned ON if they are equal or OFF if they are not equal.
Sample program
When CIO 0.00 is ON in the following example, TCMP(085) compares the content of D100 with the
contents of words D200 through D215 and turns ON the corresponding bits in D300 when the contents
are equal or OFF when the contents are not equal.
T
T+1
T+14
T+15
S0
1
14
15
R
1: Data are equal.
0: Data aren’t equal.
Comparison
TCMP
D100
D200
D300
0.00
S
T
D
S: D100
Comparison
03A1 T: D200
D201
D202
D203
D204
D205
D206
D207
D208
D209
D210
D211
D212
D213
D214
D215
R: D300
02A1
0000
0120
03A1
0000
02A1
1234
5678
9ABC
DEF0
03A1
1234
5678
9ABC
DEF0
03A1
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
1
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15