All Exams Test series for 1 year @ ₹349 only
Question

In the 8085 microprocessor, if SP = 3FFFH and memory contains: 

3FFEH = 20H, 

3FFFH = 20H, 

4000H = 10H, 

4001H = 10H.

 After executing POP H, what will be the contents of HL?

The correct answer is

1020H

This question tests how the stack operates in the 8085 microprocessor. The stack is a region of read/write memory that grows toward lower addresses, and the Stack Pointer (SP) always holds the address of the top of the stack (the last byte pushed). Data is stored in the 8085's usual little-endian order for register pairs: the lower-order byte occupies the lower address and the higher-order byte the next higher address.

The POP H instruction transfers two bytes from the top of the stack into the HL register pair and then adjusts SP. Its exact micro-sequence is:

  1. L ← memory[SP] = memory[3FFFH] = 20H (low byte goes into the low register L)
  2. SP is incremented: SP ← SP + 1 = 4000H
  3. H ← memory[SP] = memory[4000H] = 10H (high byte goes into the high register H)
  4. SP is incremented again: SP ← SP + 1 = 4001H

Combining the two bytes with H as the most-significant byte: HL = H:L = 10H:20H = 1020H. This is the correct answer, and SP finishes at 4001H.

Why the others are wrong:

  • 2010H reverses the byte order — it would place the first byte popped (20H) into H and the second (10H) into L, which contradicts the little-endian rule that the byte at the lower address becomes L.
  • 2020H would result only if both bytes read were 20H, i.e. from addresses 3FFEH and 3FFFH. But POP starts at SP = 3FFFH, so the byte at 3FFEH is never touched; it would matter only if SP had been 3FFEH.
  • 1010H would require both bytes to be 10H (from 4000H and 4001H), which would be the case only if SP had started at 4000H, not 3FFFH.
Was this answer helpful?

Similar Questions

  1. In the 8085 microprocessor, what happens to the Stack Pointer after execution of PUSH instruction?


Important Questions from Architecture of 8085

  1. What is the maximum addressing capability of Intel 8085?

  2. Which of the following interrupts is non-maskable in 8085 microprocessor?

  3. In a microprocessor, the term 'pipelining' refers to

  4. The clock frequency of an 8085 microprocessor is 5 MHz. If the time required to execute an instruction is 1.4 μs, then the number of T-states needed for executing the instruction is

  5. In an 8085 microprocessor, which one of the following instructions changes the content of the accumulator?

Need Expert Advice?
Test Series
RRB JE img
Railways
RRB JE Prev. Yr. Paper (CBT 1 + CBT 2) Test Series
290 Tests 5 Tests Free
4473 Attempts
4.3(88)
English

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App