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
Branch Type of Instructions 8085 8085 Microprocessor by Ravinder Nath Rajotiya - December 14, 2020May 10, 20210 Branch Type Instructions: Branch Type Instructions These type of instructions can be unconditional or conditional branch instruction. and are given below: Unconditional Branch JMP 16-bit Address (Label) CALL 16-bit Address (Label) RET ; Return from Subroutine RST n ; restart is a one byte call instruction, and jumps to the instruction at restart addre. Conditional Branch JZ 16-bit Address (Label) JNZ 16-bit Address (Label) JC 16-bit Address (Label) JNC 16-bit Address (Label) JP 16-bit Address (Label); if result is positive JM 16-bit Address (Label); if result is Minus JPE 16-bit Address (Label); If even parity JPO 16-bit Address (Label); if odd parity Unconditional Call CALL 16-bit Address RET 16-bit address Conditional Call Instructions Opcode Description