×

Embedded Systems Tutorial

AVR Microcontroller

8051 Microcontroller

8085 Microprocessor

8086 Microprocessor

8255 Microprocessor

Embedded Systems Practice

Find minimum of two 8-bit numbers | 8086 Microprocessor

In this tutorial, we will learn how to find the minimum of two 8-bit numbers using 8086 Microprocessor? By Akash Kumar Last updated : May 22, 2023

Problem Statement

To find minimum 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 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
JC **
MOV     AL,BL
** MOV [0602], AL
HLT

Observation

INPUT:
0600 : 14
0601 : 12

OUTPUT:
0602 : 12

Hence, we successfully find the minimum of two 8-bit numbers using 8086 Microprocessor.




Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.