ISRO Electronics & Communication (ECE) 2009 - Question 35

All ISRO Electronics & Communication (ECE) papers | ISRO Electronics & Communication (ECE) 2009

Topic: Electronics Engineering

Consider the following program for 8085
XRA A
LXI B, 0007H
Loop: DCXB
JNZ LOOP
The loop will be executed

  • A. 8 times
  • B. once
  • C. 7 times
  • D. infinite times

Answer: B. once

Explanation: After execution of XRA A instruction, the zero flag is set and DCX B instruction will not alter the zero flag. So when processor will execute JNZ instruction, this statement is false, and processor will not go inside the loop further. Finally, processor will execute the loop only once.

| | All questions of ISRO Electronics & Communication (ECE) 2009