A programmer writes a subroutine that calls another subroutine. To ensure that the 8085 microprocessor returns to the correct location after execution, which register plays the most important role?
Stack Pointer
When the 8085 executes CALL, it pushes the return address (the address of the next instruction, from the program counter) onto the stack in memory.
The Stack Pointer (16-bit) holds the address of the top of this stack; it is decremented by 2 on each CALL and incremented by 2 on each RET.
In nested subroutines, return addresses are stacked in last-in-first-out order, so each RET pops the correct address back into the PC.
The Accumulator holds data for arithmetic/logic operations; the Instruction Register holds the opcode being decoded; Register B is a general-purpose data register — none of them tracks return addresses.
Hence, the answer is Stack Pointer.
In an 8085 microprocessor, which one of the following instructions changes the content of the accumulator?
Which stack is used in 8085 microprocessors?
8085 MPU is
In the 8085 microprocessor, what happens to the Stack Pointer after execution of PUSH instruction?
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?