OR
Compute the bitwise OR of the two operands, storing the result in the left operand.
| Opcode | Bytes | Cycles | Form | Example |
|---|---|---|---|---|
| $7C | 3 | 3 | OR B:_, {U_BYTE} | OR B:1, 123 |
| $D0 | 4 | 3 | OR P:_, {U_PAIR} | OR P:2, 12345 |
| $7D | 3 | 3 | OR I:_, {U_BYTE} | OR I:4, 123 |
| $D1 | 4 | 3 | OR I:_, {U_PAIR} | OR I:4, 12345 |
| $7E | 3 | 3 | OR I:_, XHEX {XINT} | OR I:4, XHEX $D000_0000 |
| $7F | 3 | 3 | OR B:_, B:_ | OR B:1, B:2 |
| $80 | 3 | 3 | OR P:_, P:_ | OR P:2, P:4 |
| $81 | 3 | 3 | OR I:_, I:_ | OR I:4, I:8 |
| Condition flag | Output |
|---|---|
| zero (ZF) | If the result is zero, this flag is 1; otherwise it is 0. |
| negative (NF) | This flag is updated with the highest bit of the result. For example, if OR B:0, $03 stores $80 in B:0, then NF will be 1. |
| overflow (OF) | This flag is always 0. |
| carry (CF) | This flag is always 0. |