Chapter 6 Instruction Details
XBC E-Type Main Unit 6-181 Ve r. 1
6.30 Logic Operation Instruction
6.30.1 WAND, WANDP, DWAND, DWANDP
Instruction
Step
P M K F L T C S Z D.x
U N D R
WAND(P)
DWAND(P)
4~6 - O -
[Flag Set]
1) WAND (Word AND)
(1) Saves the result of word data (16-bit) S1 and S2 operated in Logic AND for each bit in D.
2) DWAND (Double Word AND)
(1) Saves the result of double word data (32-bit) (S1+1,S1) and (S2+1,S2) operated in Logic AND for each bit
in (D+1, D).
WAND
D
b15 b8
b0
b7
1
0 0
1 1 1 1
0 0 1
0 1 0 1
1 1
S2
b8
b0
b7
S1
b15 b8
b0
b7
b15
1
0 1 0
0 1
1
0 1
1 1
1 0 1
1 1
1 0
0 0
0 1
1 0
0 1
0 1
0 1 1 1
Data to execute WAND operation with S2
Data to execute WAND operation with S1
Address to save WAND operation result in
Flag Description
To be set if operation result is Zero.