Propeller Manual

Table Of Contents
3: Assembly Language Reference – OR
OR
Instruction: Bitwise OR two values.
OR Value1, # Value2
Result: Value1 OR Value2 is stored in Value1.
Value1 (d-field) is the register containing the value to bitwise OR with Value2 and is
the destination in which to write the result.
Value2 (s-field) is a register or a 9-bit literal whose value is bitwise ORed with
Value1.
Opcode Table:
–INSTR– ZCRI –CON– –DEST– –SRC– Z Result C Result Result Clocks
011010 001i 1111 ddddddddd sssssssss
Result = 0 Parity of Result Written 4
Concise Truth Table:
In
Out
Destination Source Z
C
Effects
Destination Z C
$0000_0000; 0 $0000_0000; 0 -
-
wz wc
$0000_0000; 0 1 0
$0000_0000; 0 $0000_0001; 1 -
-
wz wc
$0000_0001; 1 0 1
$0000_000A; 10 $0000_0005; 5 -
-
wz wc
$0000_000F; 15 0 0
Explanation
OR (bitwise inclusive OR) performs a bitwise OR of the value in Value2 into that of Value1.
If the
WZ effect is specified, the Z flag is set (1) if Value1 OR Value2 equals zero. If the WC
effect is specified, the C flag is set (1) if the result contains an odd number of high (1) bits.
The result is written to Value1 unless the
NR effect is specified.
Propeller Manual v1.1 · Page 327