

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
8086 program to add the content of one segment to another segment
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 |
… | … |
- Related Questions & Answers
- Seven Segment Displays
- Find middle point segment from given segment lengths in C++
- Program to find area of a Circular Segment in C++
- What is the TCP Segment Header?
- C++ program to append content of one text file to another
- Segment Trees in Data Structure
- Program to check if binary string has at most one segment of ones or not using Python
- Interfacing 7(Seven) Segment Display to 8085 Microprocessor
- Add one Python string to another
- How to copy the content of one HTML5 Canvas to another Canvas locally?
- Segment button dropdowns in Bootstrap input groups
- Python – Cross Join every Kth segment
- Add one polynomial to another in Python
- Add one Chebyshev series to another in Python
- Add one Hermite series to another in Python
Advertisements