Question:

The content of register (B) and register (C) of 8085 microprocessor are 0AFH and 0BH. It is desired to multiply the content of register B and register C and store the results in accumulator. A part of 8085 program for this purpose is given as : \[ \texttt{MVI A,00H} \] \[ \texttt{LOOP : _________} \] \[ \texttt{_________} \] \[ \texttt{_________} \] \[ \texttt{HLT} \] A sequence of instructions to complete the program would be :

Show Hint

8085 multiplication logic: \[ \text{Multiplication}=\text{Repeated addition} \] Typical loop structure: \[ \texttt{ADD operand} \] \[ \texttt{DCR counter} \] \[ \texttt{JNZ LOOP} \]
Updated On: May 22, 2026
  • JNZ LOOP, ADD B, DCR C
  • ADD B, JNZ LOOP, DCR C
  • DCR C, JNZ LOOP, ADD B
  • ADD B, DCR C, JNZ LOOP
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

Concept: 8085 microprocessor does not contain a direct multiplication instruction. Therefore multiplication is performed using: \[ \text{Repeated addition} \] If: \[ \text{Product}=B\times C \] then: \[ B \text{ is repeatedly added } C \text{ times} \] Accumulator stores intermediate and final result.

Step 1:
Understand the initial instruction. Given: \[ \texttt{MVI A,00H} \] This instruction initializes accumulator with: \[ 00H \] Thus: \[ A=00H \] This is necessary because repeated additions start from zero.

Step 2:
Understand the multiplication logic. Given: \[ B=0AFH \] and \[ C=0BH \] To multiply: \[ B\times C \] we repeatedly perform: \[ A=A+B \] and reduce count register: \[ C=C-1 \] until: \[ C=0 \]

Step 3:
Determine first instruction inside loop. The first operation must add register \(B\) into accumulator. Instruction: \[ \texttt{ADD B} \] This performs: \[ A=A+B \] Thus first missing instruction is: \[ \texttt{ADD B} \]

Step 4:
Determine second instruction. After one addition, counter register \(C\) must decrease. Instruction: \[ \texttt{DCR C} \] This decreases: \[ C=C-1 \] Thus second missing instruction is: \[ \texttt{DCR C} \]

Step 5:
Determine third instruction. Loop must continue until: \[ C=0 \] Instruction: \[ \texttt{JNZ LOOP} \] means: \[ \text{Jump if Zero flag is not set} \] Thus the loop continues while: \[ C\neq 0 \] Hence third missing instruction is: \[ \texttt{JNZ LOOP} \]

Step 6:
Write complete program sequence. The sequence becomes: \[ \texttt{ADD B} \] \[ \texttt{DCR C} \] \[ \texttt{JNZ LOOP} \]

Step 7:
Verify with one example iteration. Initially: \[ A=00H \] After first iteration: \[ A=A+B=00H+AFH=AFH \] Then: \[ C=0BH-1=0AH \] Loop continues until: \[ C=00H \] Thus repeated addition successfully performs multiplication.

Step 8:
Write the final answer. Hence the correct option is: \[ \boxed{(D)\ \texttt{ADD B,\ DCR C,\ JNZ LOOP}} \]
Was this answer helpful?
0
0