Gate- 2005 Two marks Questions
Common data for Questions 10 and 11
Consider an 8085 Microprocessor system
The following program start at location 0100H.
LXI SP, 00FF
LXI H, 0107
MVI A, 20H
SUB M
Question 10. The content of accumulator when the program counter when the program counter reaches 0109H is
(a) 20H
(b) 02H
(c) 00H
(d) FFH
Answer: (c)
Explanation:
0100 LXI SP, 00FF
0103 LXI H, 0107
0106 MVI A, 20H
0108 SUB M
0109
M Contains the data of memory whose address which is in HL pair.
HL has address 0107
0107 corresponds to 20H.
therefore A-M=20H-20H = 00H
Question 11.
If in addition following code exists from 0109H onwards,
ORI 40H
ADD M
What will be the result in the accumulator after the last instruction is executed?
(a) 40H
(b) 20H
(c) 60H
(d) 42H
Answer: (c)
Explanation:
After 0109 Accumulator will contain 00H
ORI will execute OR operation between Accumulator and 40H and store the content to Accumulator A = 40H => 00H OR 04H
Now Adding M(20H) with A(40H) gives 60H.
Gate- 2006 Two mark questions
Question 12:
Following is the segment of the 8085 assemble language program
LXI SP, EFFFH
CALL 3000H
3000H: LXI H,3CF4H
PUSH PSW
SPHL
POP PSW
RET
On completion of RET execution, the contents of SP is
(a) 3CFOH
(b) 3CF8H
(c) EFFDH
(d) EFFFH
Answer: (b)
Explanation:
Common data for Questions 10 and 11
Consider an 8085 Microprocessor system
The following program start at location 0100H.
LXI SP, 00FF
LXI H, 0107
MVI A, 20H
SUB M
Question 10. The content of accumulator when the program counter when the program counter reaches 0109H is
(a) 20H
(b) 02H
(c) 00H
(d) FFH
Answer: (c)
Explanation:
0100 LXI SP, 00FF
0103 LXI H, 0107
0106 MVI A, 20H
0108 SUB M
0109
M Contains the data of memory whose address which is in HL pair.
HL has address 0107
0107 corresponds to 20H.
therefore A-M=20H-20H = 00H
Question 11.
If in addition following code exists from 0109H onwards,
ORI 40H
ADD M
What will be the result in the accumulator after the last instruction is executed?
(a) 40H
(b) 20H
(c) 60H
(d) 42H
Answer: (c)
Explanation:
After 0109 Accumulator will contain 00H
ORI will execute OR operation between Accumulator and 40H and store the content to Accumulator A = 40H => 00H OR 04H
Now Adding M(20H) with A(40H) gives 60H.
Gate- 2006 Two mark questions
Question 12:
Following is the segment of the 8085 assemble language program
LXI SP, EFFFH
CALL 3000H
3000H: LXI H,3CF4H
PUSH PSW
SPHL
POP PSW
RET
On completion of RET execution, the contents of SP is
(a) 3CFOH
(b) 3CF8H
(c) EFFDH
(d) EFFFH
Answer: (b)
Explanation:
Let SP=A001
ReplyDeleteAfter execution of following instruction what will be the value of SP
PUSH SW
XTHL
PUSH D
JMP FC70 H
Can anyone solve this
SP=SP-4=A001-4=9FFD
Delete