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:

  1. Load the accumulator with the first data.
  2. Move the content of accumulator to register B.
  3. Load the accumulator with the second data.
  4. Compare the content of accumulator with the content of register B.
  5. If carry flag is set then jump to the step 7.
  6. Copy the content to accumulator.
  7. 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.






Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.
Learn PCB Designing: PCB DESIGNING TUTORIAL




Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.