IP2022 Users ManualInstruction Set Architecture
www.ubicom.com
117
AND W,fr
AND W,fr into W
Operation:
W = W & fr
Bits affected:
Z
Opcode:
0001 010f ffff ffff
Description:
This instruction performs a bitwise logical AND of
the contents of W and the specified data memory
location, and writes the 8-bit result into W. The
data memory location is left unchanged. If the
result is zero, the Z bit is set.
Cycles:
1
Example:
and w,0x099
This example performs a bitwise logical AND of
the value stored in data memory location 0x099
with W. The result is written back to W.
For example, suppose that the data memory
location 0x099 holds the value 0x0F and W holds
the value 0x13. The instruction takes the logical
AND of 0x0F and 0x13 and writes the result 0x03
into W. The result is nonzero, so the Z bit is
cleared.