STACK 8085 Microprocessors. Stack is a set of memory locations reserved in RAM used to store temporary information. It is a shared resource both by microprocessor and programmer. The informations are stored into the stack, just like arranging the plates one above the other. Hence the stack operates on the Last In, First Out (LIFO) principle..
STACK 8085 Microprocessors. The location of the most recent data on the stack is known as the TOP of the stack. The 8085 has a 16-bit register known as the Stack Pointer . The function of the stack pointer is to hold the starting address of the stack. This address can be decided by the programmer. he stack pointer always points to the top of the stack. Contents can be stored in the stack using the PUSH instruction and can restore the contents by using the in struction POP ..
STACK 8085 Microprocessors. MNEMONIC DESCRIPTION LXI SP, 16-bit Load the stack pointer register with a 16-bit address. PUSH Rp Copies the contents of the specified register pair on the stack POP Rp Copies the contents of the top two memory locations of the stack into the specified register pair..
STACK 8085 Microprocessor PUSH and POP Operation in 8085.
STACK 8085 Microprocessors. LXI SP, 2099H LXI H, 42F2H PUSH H Delay Counter POP H.
STACK 8085 Microprocessors. The instruction LXI SP, 2099H will initialize the stack pointer with the address of 2099H. LXI H, 42F2H will initialize or load HL register pair with 42F2H data so H = 42 and L = F2 . After the execution of PUSH H instruction the stack pointer is decreased by one to 2098H and the contents of the H register are copied to memory location 2098H . The stack pointer is again decreased by one to 2097H and the contents of the L register are copied to memory location 2097H ..
STACK 8085 Microprocessors. push operation in 8085 stack.
STACK 8085 Microprocessors. Cntents of Stack and Registers After PUSH Operation After the execution of POP H instruction, the contents of the top of the stack location shown by the stack pointer are copied in the L register and the stack pointer is increased by one to 2098H . The contents of the top of the stack are copied in the H register and the stack pointer is increased by one. The contents of the memory locations 2097H and 2098H are not destroyed until some other data bytes are stored in these locations..