AND
WAND, WANDP, DAND, DANDP
WAND instruction performs a bitwise AND operation on Source 1 and Source 2 and places the result in the Destination. The bitwise AND operation returns 1, if the matching bits from both the operands are 1, otherwise it returns 0.
WAND(WANDP) is for 16bit source and DAND(DANDP) is for 32bit source.
S1, S2 | Source |
D | Destination |
Instruction | Device address | No. of Steps | Flag | |||||||||||||||
M | X | Y | K | L | F | T | C | S | Z | D | @D | Int. |
| Error | Zero | Carry | ||
WAND WANDP DAND DANDP | S1 | o | o | o | o | o | o | o | o | - | o | o | o | o | 4 | o | - | - |
S2 | o | o | o | o | o | o | o | o | - | o | o | o | o | |||||
D | o | - | o | o | o | - | o | o | - | - | o | o | - |
Example)
If F12 is ON, H3647 moves to D0.
If F10 is ON, the WAND performs a bitwise AND operation by using the 16bits in H3647 (D0) and H651A (D1) and places the result H2402 in the Y20.