A <- A | r
OR
r
| b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 |
|---|---|---|---|---|---|---|---|
| 1 | 0 | 1 | 1 | 0 | r | ||
A logical OR operation is performed between the contents of register r and the contents of the Accumulator. The result is stored in the Accumulator. The r symbol identifies the registers A, B, C, D, E, H, or L, assembled as follows in the object code:
| Register | r | Hex |
|---|---|---|
| A | 111 | $B7 |
| B | 000 | $B0 |
| C | 001 | $B1 |
| D | 010 | $B2 |
| E | 011 | $B3 |
| H | 100 | $B4 |
| L | 101 | $B5 |
| S | is set if result is negative, otherwise it is reset. |
| Z | is set if result is 0, otherwise it is reset. |
| H | is reset. |
| P/V | is reset if overflow, otherwise it is reset |
| N | is reset. |
| C | is reset. |
If Register H contains $48 (0100 1000) and the Accumulator contains $12 (0001 0010), then upon the execution of
OR H
the Accumulator contains $5A (0101 1010).