8086 program to add the content of one segment to another segment

MicroprocessorMicrocontroller8086

In this program we will see how to add two 8-bit numbers which are in different segments.

Problem Statement

Write 8086 Assembly language program to add content of memory location 2000:500 and 3000:600, and store the final result at 5000:700.

Discussion

Here we are initializing the CX register with the base address of first operand. Also store this into data segment register. Now take the number from offset 500 to AX. Now point CX to 3000, and load DS with 3000. Then add the AX with data at position 3000:0600, and store result at AX. Now again load CX as 5000, and store the AX value at offset 700.

Input

Address
Data


2000:0500
2C


3000:0600
4F


 

Flow Diagram

 

Program

 

Output

Address
Data


5000:0700
7B


raja
Published on 12-Mar-2019 09:34:49
Advertisements