Stack and Subroutines in 8085 8085 Microprocessor by Ravinder Nath Rajotiya - October 13, 2021October 13, 20210 Stack and Subroutines Stack and subroutine are powerful mechanism in 8085 microprocessor for modularizing the assembly program, Stack A stack is a first in last out memory locations in the r/w memory and is used during the execution of a program. This memory is generally specified by the programmer in the main program. To point in the stack memory every processor has a pointer known as the stack pointer. To use the stack, the stack pointer is fist loaded with the beginning address of the stack memory by using the instruction LXI SP, XXXXh. Where XXXXh denotes a 16-bit memory address. The stack may grow up or down. In 8085 the stack grows downward in the reverse order, that means, that once the