Home »
Embedded Systems
Minimum of Two 8 bits number in 8085 Microprocessor
Here, we are going to learn how to find minimum of two 8 bits numbers in 8085 Microprocessor?
Submitted by Akash Kumar, on October 18, 2018
Problem statement:
To find minimum of two 8bit numberusing 8085 microprocessor.
Algorithm:
- Load the accumulator with the first data.
- Move the content of accumulator to register B.
- Load the accumulator with the second data.
- Compare the content of accumulator with the content of register B.
- If carry flag is set then jump to the step 7.
- Copy the content to accumulator.
- Now load the result value in memory location from accumulator.
Program:
LDA 2050
MOV B, A
LDA 2051
CMP
JC **
MOV A, B
** STA 2052
Observation:
INPUT:
2050:05
2051:02
OUTPUT:
2052:02
Hence, we successfully find the minimum among two 8 bits numbers.