It is desired to multiply the numbers 0AH by 0BH and store the result in the accumulator. The numbers are available in registers B and C, respectively. A part of the 8085 program for this purpose is given below: MVI A, 00H; Loop:---; ---; ---; ---. The sequence of remaining 4 instructions to complete the program would be
1
A, B, C, D
2
A, C, B, D
3
B, A, C, D
4
C, B, D, A
Official Solution
Correct Option:
(2)
Step 1: Understand the task.
The program needs to compute 0AH 0BH. This can be done by adding 0AH to an accumulator 0BH (11 decimal) times.
Register B holds the number to be added (0AH). Register C holds the loop count (0BH). The accumulator (A) will store the sum, starting from 0.
Step 2: Outline the program logic.
Initialize the accumulator to 0. (Given: `MVI A, 00H`) Start a loop. Add the contents of register B to the accumulator. (Instruction: `ADD B`) Decrement the loop counter in register C. (Instruction: `DCR C`) Check if the counter (C) has reached zero. If not, repeat the loop. (Instruction: `JNZ LOOP`) If the counter is zero, halt the program. (Instruction: `HLT END`)
Step 3: Match the logic to the given instructions.
The instruction to add B is A. ADD B. The instruction to decrement C is C. DCR C. The instruction to jump if not zero is B. JNZ LOOP. The instruction to halt is D. HLT END.
The correct sequence inside and after the loop is: `ADD B`, then `DCR C`, then `JNZ LOOP`, and finally `HLT END`. This corresponds to the sequence A, C, B, D.
About Microprocessors - CUET-PG
Microprocessors is a vital chapter for CUET-PG aspirants. Mastering the concepts covered in this chapter is essential for securing a top rank.
By rigorously practicing the previous year questions associated with this chapter, you can identify high-yield topics, understand the examiner's perspective, and boost your confidence during the actual exam.
Frequently Asked Questions
Why focus on Microprocessors PYQs?
Analyzing PYQs for this specific chapter reveals the most frequently tested concepts and the typical complexity of questions, allowing you to tailor your study plan efficiently.
How to best use this analysis?
Review the topic breakdown to see which sub-topics within Microprocessors carry the most weight. Then, tackle the questions iteratively to solidify your understanding.