Or is an instruction that takes an 8-bit input an compare sit with the accumulator. It checks to see if anything is set, and if neither are set, it results in a zero.

0 and 0 result: 0
0 and 1 result: 1
1 and 0 result: 1
1 and 1 result: 1


OR op8

Allowed Instructions

or a
or b
or c
or d
or e
or h
or l
or ixh
or ixl
or iyh
or iyl
or (hl)
or (ix+n)
or (iy+n)
or n        ;8 bit constant


C and N flags cleared, P/V detects parity, and rest are modified by definition.


Used in bit-masking. For more information see here.


r denotes 8-bit register.

r 4
X 7
(hl) 7
(ix+X) 19
(iy+X) 19

See Also


Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.