2-215
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Logic Instructions
2
XORW/XORL
Function
Sample program
When the execution condition CIO 0.00 is ON, the logical exclusive OR is taken of corresponding bits in
CIO 151, CIO 150 and D1001, D1000 and the results will be output to corresponding bits in D1201 and
D1200.
XORW
XORW(036) takes the logical exclusive OR of
data specified in I1 and I2 and outputs the
result to R.
XORL
XORL(612) takes the logical exclusive OR of
data specified in I1 and I2 as double-word data
and outputs the result to R, R+1.
I
1
I
2
+
I
1
I
2
R
I1I2R
110
101
011
000
(I
1,
I
1
+1)
(I
2
, I
2
+1)+ (I
1
, I
1
+1)
(I
2
, I
2
+1)
(R, R+1)
I1, I1+1 I2, I2+1 R, R+1
110
101
011
000
150.00
150.01
150.02
150.03
150.15
151.00
151.15
00
01
02
03
15
00
15
1
1
0
0
1
1
0
1
0
1
0
1
0
1
00
01
02
03
15
00
15
0
1
1
0
0
1
1
XORL
150
D1000
D1200
0.00
S
1
: 150CH
S
1
+1: 151CH
S
2
: D1000
S
2
+1: D1001
D: D1200
D+1: D1201
D1200
D1201
D1000
D1001
Note The symbol indicates exclusive logical OR.