×

Embedded Systems Tutorial

AVR Microcontroller

8051 Microcontroller

8085 Microprocessor

8086 Microprocessor

8255 Microprocessor

Embedded Systems Practice

Multiply Two 8-bit Numbers with Carry in 8085 Microprocessor

In this tutorial, we will learn how to find the multiplication of two 8-bit numbers with carry in 8085 Microprocessor? By Raju Singh Bhati Last updated : May 13, 2023

Multiplication of Two 8-bit Numbers with Carry in 8085 Microprocessor

Given two 8-bit numbers, we have to multiply them with carry in 8085 Microprocessor.

Algorithm

  1. Load HL pair with initial data using LHLD command.
  2. Exchange the data of HL and DE pair using XCHG command.
  3. Copy the data of register D into Register C.
  4. Now initialize register D with 0.
  5. Also initialize HL pair with 0 using LXI command.
  6. Use the DAD command to add the data of DE pair into the data of HL pair and store in HL Pair.
  7. Decrease the value of C by one.
  8. Check if the result from previous instruction resets the zero flag and if true, jump to address XXX.
  9. Store the content of the HL pair into desired location.
  10. Stop.

Program

	LHLD 2050
	XCHG
	MOV C, D
	MVI D 00
	LXI H 0000
xxx	DAD D
	DCR C
	JNZ 200A
	SHLD 3050
	HLT

Observation

INPUT:
2050:43
2051:07

OUTPUT:
3050:D5
3051:01

Hence successfully multiplied two 8 bits numbers with carry using 8085 microprocessor..




Comments and Discussions!

Load comments ↻





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