Home » Embedded Systems

Find the maximum of two 8-bit numbers | 8086 Microprocessor

Here, we are going to learn how to find the maximum of two 8-bit numbers using 8086 Microprocessor?
Submitted by Raju Singh Bhati, on November 08, 2018

Problem statement:

To find maximum of two 8-bit numbers using 8086 Microprocessor.

Algorithm:

  1. Move the first number to register AL.
  2. Move the second number to register BL.
  3. Compare the content of register AL and BL if not carry goto step 5 otherwise goto step 4.
  4. Move the content of register BL to the register AL.
  5. Move the content of register AL to the memory location.

Program:

	MOV     AL, [0600]
	MOV     BL, [0601]
	CMP     AL, BL
	JNC **
	MOV     AL, BL
	** MOV [0602], AL
	HLT

Observation:

    INPUT: 
    0600: 12
    0601: 21

    OUTPUT: 
    0602: 21

Hence successfully find the maximum of two 8-bit numbers using 8086 Microprocessor.






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.