In Intel 8085 microprocessor, is there any way or instruction exist for find out, to where Stack Pointer currently points to?.
yes, it is possible to find out the value of SP at any time. Here is explanation Using DAD Rp instruction, we can Add Rp with HL pair content. follow the steps below:
Following code will work well:
LXI H, 0000h; Load HL reg. pair with zero.
DAD SP ; Adding HL and SP so that only SP value will be there in HL reg. pair.
HLT ; Once SP value is there in HL reg. pair, it can be taken any where.