8085 program to sum of two 8 bit numbers without carry


Here we will see how to add two 8-bit numbers without carry in 8085.

Problem Statement

Write 8085 Assembly language program to perform 8-bit addition without carry. The numbers are stored at F100, and F101. Result will be stored at F102.

Discussion

In 8085, there is ADD instruction to add two numbers. We will set the HL pair to point the numbers, then load accumulator with the number. Then add with ADD M operation which can add items from memory pointed by HL pair and accumulator.

Input

Address
Data


F100
CE
F101
21


 

Flow Diagram

 

Program

Address
HEX Codes
Labels
Mnemonics
Comments
F000
21, 01, F1
 
LXI H,F100H
Point to get the numbers
F003
7E

 
MOV A,M

Load first number to A
F004
23
 
INX H
Point to next operand
F005
86

 
ADD M

Add M with A
F006
23
 
INX H
Point to next location
F007
77

 
MOV M,A

Store result
F008
76
 
HLT
Terminate the program

 

Output

Address
Data


F102
EF


 


Updated on: 30-Jul-2019

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements