Difference between revisions of "Z80:Opcodes:OR"

From Learn @ Cemetech
Jump to navigationJump to search
(Initial automated import)
 
 
Line 34: Line 34:
 
== Uses ==
 
== Uses ==
  
Used in bit-masking. For more information see [[Z80:Flags-and-bit-level-instructions|here]].
+
Used in bit-masking. For more information see [[Z80:Flags and Bit-Level Instructions|here]].
  
 
== T-States ==
 
== T-States ==

Latest revision as of 07:50, 6 February 2016

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

Syntax

   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

Effects

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

Uses

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

T-States

r denotes 8-bit register.

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

See Also

AND,BIT,CCF,CPL,RES,SCF,SET,XOR