-
The contents (in Hexadecimal) of some of the memory locations in an 8085A based system are given below:
The contents of stack pointer (SP), program counter (PC) and (H, L) are 2700H, 2100H and 0000H respectively. When the following sequence of instructions are executed
2100 H: DAD SP
2101 H: PCHL
the contents of (SP) and (PC) at the end of execution will be
-
- (PC) = 2102H, (SP) = 2700H
- (PC) = 2700H, (SP) = 2700H
- (PC) = 2800H, (SP) = 26 FEH
- (PC) = 2A02H, (SP) = 2702H
Correct Option: B
Given
(SP) = 2700H
(PC) = 2100H
(HL) = 0000H
2100H : DAD SP: it adds the contents of stack pointer (SP) to the content of HL pair and store the result in HL pair.
∴ 2700H + 0000H = 2700H stored in HL pair 2101H: PCH L; the content of HL pair are transfered to program counter.
So now PC has 2700H and contents of SP remains unchanged
∴ (PC) = 2700H
(SP) = 2700H