8085 instruction effects on flags: match each instruction to the correct flag behavior. List I (Instruction) List II (Flag behaviour) A. ORI 1. CY reset B. DAA 2. CY reset and AC reset C. PCHL (copy HL→PC) 3. S, Z, AC, P, CY flags affected 4. S, Z, P are modified 5. No flags affected

Difficulty: Easy

Correct Answer: A-2, B-3, C-5

Explanation:


Introduction / Context:
On the 8085 microprocessor, arithmetic/logic instructions set or reset condition flags. Correctly recalling which flags change for ORI, DAA, and PCHL avoids subtle debugging errors and is frequently tested.



Given Data / Assumptions:

  • ORI performs a bitwise OR with immediate data.
  • DAA adjusts the accumulator after BCD addition, affecting multiple flags.
  • PCHL loads the program counter from HL and is a logical jump (no arithmetic).


Concept / Approach:

For ORI/XRI/ANI, 8085 specifies CY and AC are reset to 0; S, Z, and P are set per result (affected). DAA can alter S, Z, AC, P, and CY depending on the adjust; thus many flags are affected. PCHL is a register-to-PC transfer and does not modify flags.



Step-by-Step Solution:

ORI: emphasize the distinctive rule CY=0 and AC=0 (and result flags adjust). In the given list, the closest explicit mapping is “CY reset and AC reset” ⇒ A-2.DAA: affects S, Z, AC, P, CY ⇒ B-3.PCHL: a control transfer with no arithmetic/logic ⇒ flags unchanged ⇒ C-5.


Verification / Alternative check:

8085 datasheets list flag effects: ORI clears CY and AC; DAA may set/reset CY/AC and updates S, Z, P; PCHL does not affect flags. These corroborate the chosen mapping.


Why Other Options Are Wrong:

  • Mapping PCHL to any flag changes contradicts documentation.
  • Assigning only “S, Z, P modified” to ORI omits the guaranteed clearing of CY and AC emphasized by 8085 rules.


Common Pitfalls:

Confusing ORI with ADD/ADI (which may set carry), and assuming DAA only affects AC without considering a possible carry out after adjustment.


Final Answer:

A-2, B-3, C-5

More Questions from Matching Questions

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion