Difficulty: Easy
Correct Answer: False
Explanation:
Introduction / Context:
Understanding conditional jumps is essential in 8051 assembly. JNZ branches only when the accumulator is nonzero. This snippet deliberately loads zero before testing, so you must reason about what JNZ will do.
Given Data / Assumptions:
Concept / Approach:
Immediately after loading 0, the condition for JNZ is false. Therefore, the jump is not taken and control falls through to the next instruction after JNZ, not back to LOOP.
Step-by-Step Solution:
Verification / Alternative check:
Run on an 8051 simulator and watch the program counter: it does not branch to LOOP.
Why Other Options Are Wrong:
Common Pitfalls:
Assuming JNZ checks a generic zero flag; it specifically checks the accumulator value.
Final Answer:
False — the code executes once and then falls through.
Discussion & Comments