Instruction Set ArchitectureIP2022 Users Manual
188
www.ubicom.com
OR W,#lit8
OR W,Literal into W
Operation:
W = W | lit8
Bits affected:
Z
Opcode:
1101 kkkk kkkk kkkk
Description:
This instruction performs a bitwise logical OR of
the contents of W and an 8-bit literal value, and
writes the 8-bit result into W. If the result is zero,
the Z bit is set.
Cycles:
1
Example:
or
w,#0x0F;set low four W bits
This example performs a bitwise logical OR of W
with the literal value 0x0F. The result is written
back to W.
For example, suppose that W holds the value
0x50. The instruction takes the logical OR of this
value with 0x0F and writes the result 0x5F into W.
The result is nonzero, so the Z bit is cleared.