Question 1 |
The following FIVE instructions were executed on an 8085 microprocessor.
MVI A, 33H
MVI B, 78H
ADD B
CMA
ANI 32H
The Accumulator value immediately after the execution of the fifth instruction is
MVI A, 33H
MVI B, 78H
ADD B
CMA
ANI 32H
The Accumulator value immediately after the execution of the fifth instruction is
00H | |
10H | |
11H | |
32H |
Question 1 Explanation:
\begin{aligned} \text { MVI } A, 33 H &: (A)=33 H \\ \text { MVI B, } 78 \text { H } &: \text { (B) }=78 \mathrm{H} \\ \text { ADD } \mathrm{B} &: (\mathrm{A}) \leftarrow(\mathrm{A})+(\mathrm{B})=33 \mathrm{H} \\ +78 \mathrm{H}=\mathrm{AB} &\text { H } \Rightarrow (\mathrm{A})=\mathrm{AB} \mathrm{H} \\ &\text { (A) }=10101011\\ CMA&:\text{Complement}\\ \text { Accumulator } &\Rightarrow(A) =01010100 \\ \text { ANI } 32 \mathrm{H} &:\text { (A) } \leftarrow(\text { A) AND } 32 \mathrm{H} \\ &\quad 01010100\\ &\quad 00110010\\ &\quad 10010000 \Rightarrow(A)=10 H \end{aligned}
Question 2 |
Which one of the following 8085 microprocessor programs correctly calculates the product of two 8-bit numbers stored in registers B and C?
MVI A, 00H JNZ LOOP CMP C LOOP: DCR B HLT | |
MVI A, 00H CMP C LOOP: DCR B JNZ LOOP HLT | |
MVI A, 00H LOOP: ADD C DCR B JNZ LOOP HLT | |
MVI A, 00H ADD C JNZ LOOP LOOP: INR B HLT |
Question 2 Explanation:
Product can be obtained by repeated addition.
Only {C) option satisfied addition repeatedly.
Here register 'B' is used as count to add register 'C' to accumulator, initially having OOH. Adding 'B' times 'C' to accumulator.
Only {C) option satisfied addition repeatedly.
Here register 'B' is used as count to add register 'C' to accumulator, initially having OOH. Adding 'B' times 'C' to accumulator.
Question 3 |
An 8085 microprocessor executes "STA 1234H" with starting address location 1FFEH (STA copies the contents of the Accumulator to the 16-bit address location). While the instruction is fetched and executed, the sequence of values written at the address pins A_{15}-A_{8}
is
1FH, 1FH, 20H, 12H | |
1FH, FEH, 1FH, FFH, 12H | |
1FH, 1FH, 12H, 12H | |
1FH, 1FH, 12H, 20H, 12H |
Question 3 Explanation:
Given STA 1234 H
Starting addressing location is 1 FFEH
1FFEH : STA 1234H
i.e. 1FFEH : XX Opcode fetch
1FFFH \rightarrow 34 \mathrm{H}
2000 H \rightarrow 12 H
Now after the instruction, 1234 H memory location will have the contents of accumulator.
So, the sequences of values written at the address pins \mathrm{A}_{15}-\mathrm{A}_{8} is as shown above.
1 \mathrm{FH}, 1 \mathrm{FH}, 20 \mathrm{H}, 12 \mathrm{H}
Starting addressing location is 1 FFEH
1FFEH : STA 1234H
i.e. 1FFEH : XX Opcode fetch
1FFFH \rightarrow 34 \mathrm{H}
2000 H \rightarrow 12 H
Now after the instruction, 1234 H memory location will have the contents of accumulator.
So, the sequences of values written at the address pins \mathrm{A}_{15}-\mathrm{A}_{8} is as shown above.
1 \mathrm{FH}, 1 \mathrm{FH}, 20 \mathrm{H}, 12 \mathrm{H}
Question 4 |
For 8085 microprocessor, the following program is executed.
MVI A, 05H;
MVI B, 05H;
PTR: ADD B;
DCR B;
JNZ PTR;
ADI 03H;
HLT;
At the end of program, accumulator contains
MVI A, 05H;
MVI B, 05H;
PTR: ADD B;
DCR B;
JNZ PTR;
ADI 03H;
HLT;
At the end of program, accumulator contains
17H | |
20H | |
23H | |
05H |
Question 4 Explanation:
\begin{array}{l} A=05+05+04+03+02+01+03 \\ A=23 \\ A=17 H \end{array}
Question 5 |
An 8085 assembly language program is given below.
Line 1: MVI A, B5H
2: MVI B, 0EH
3: XRI 69H
4: ADD B
5: ANI 9BH
6: CPI 9FH
7: STA 3010H
8: HLT
After execution of line 7 of the program, the status of the CY and Z flags will be
Line 1: MVI A, B5H
2: MVI B, 0EH
3: XRI 69H
4: ADD B
5: ANI 9BH
6: CPI 9FH
7: STA 3010H
8: HLT
After execution of line 7 of the program, the status of the CY and Z flags will be
CY = 0, Z = 0 | |
CY = 0, Z = 1 | |
CY = 1, Z = 0 | |
CY = 1, Z = 1 |
Question 5 Explanation:
\begin{aligned} \text{After }A D D B&: \quad A \leftarrow E A H\\ A N \mid 9 B&: \quad A \leftarrow 8 A H \\ \quad C P \mid 9 F H&: \quad A \leftarrow 8 A H \\ \text{But }\quad[A]& \lt 9 F H \\ i.e. \quad 8 A& \lt 9 F H \\ \therefore \quad C Y&=1 ; Z=0 \end{aligned}
There are 5 questions to complete.