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. |