Logical Instructions
Logical Instructions
◦ OR operation
◦ XOR operation
◦ Greater Than
◦ Less Than
The contents of the accumulator are XORed with the 8-bit data.
The result is placed in the accumulator.
S, Z, P are modified to reflect the result.
CY and AC are reset.
Example: XRI 86H.
Program Example
7 6 5 4 3 2 1 0
Accumulator
Carry Flag
RAL
7 6 5 4 3 2 1 0
Accumulator
◦ The compare instruction sets the flags (Z, Cy, and S).
◦ The compare is done using an internal subtraction that
does not change the contents of the accumulator. A – (R
/ M / #)