Question
Write and run a program using 8086 assembly language that calculates the sum and difference of two values stored in the memory locations.
Answer :
Word Count : 868
___ ______ ___ _________ ______ _________ ________ _______ ______ _______.
__________ _________ ________ __________ ___ ________ _______.
____ _____ _____ ___ ___ __________ ______.
________ _____ ______ __________ _______ __________.
__________ ______ _____ ____ ____ ______ _____ ____.
_______ __________ ________ _____ __________ _____ _____ ______ _______ ___.
____ ______ ____ _________ ___.
_______ ____ _________ ___ ____ ________.
___ __________ _________ ____ ______.
_____ __________ ________ ___ ______ ____ _________ ______ _________.
____ ___ _______ _________ ____ __________ _________ _____ ____ _________ _______.
________ ________ _________ ___ _____ ___.
_______ ____ ___ __________ _______ __________ _______ ___.
_______ ______ ______ ________ _____.
_______ ______ ________ _________ _________ _________ ____.
_____ _______ ___ ____ ______ _______ ____ ____ ______ __________ _____ _____.
_________ __________ ___ ___ _______ ____ ____ _______ ______ ______ ________.
___ ____ _________ ________ _______ ____ _____ __________ _______.
____ __________ _______ _____ _____ ______ ______ _______.
_________ _________ ______ ________ ______ _________.
__________ _________ _____ _________ ________ __________ ___ _________ _________ ___ ________ ______.
___ __________ ______ ___ ____ ______ ________ ___ __________ _____ ______ ______.
__________ ________ ___ _________ ________.
_______ ________ __________ ___ ___ _____ ____ _______ __________ __________ _____ _______.
__________ ________ ______ ____ ___ ___ _________ _________ __________ _________ _________.
___ _______ ____ _______ __________ _______ __________ _____ ____ ____ _________.
__________ _________ __________ __________ ______ ___ _________.
_____ _________ _____ _______ _________ _________ ___ ________ _______ __________.
__________ _________ _____ ________ _______ _____ ______ _____ _______ ________.
_______ __________ _____ ______ _____ ______.
_______ ___ ________ ___ _________ ___ _____ _____.
________ __________ _______ _______ __________ _________ ___ _______ _______ _____ ________ ____.
____ ___ _____ _____ ________ ___ ___ ______ ________ _______ ___ ____.
_____ ____ _________ ________ ______ _____ _____ _______ ____ _______.
____ ____ __________ _________ ___.
___ _____ ____ ____ ___ ______.
__________ ______ _____ ________ ___ ____ ______ ______ _________ _________.
_______ ______ ________ _________ _____ ___ ___ ____ _______ __________ ______.
____ __________ _______ _____ ________ _________ ________ _____ __________ _____.
______ _________ ___ _________ ____ ___ _______ ___ ________ __________ ________.
______ ________ __________ _____ ___ ____ ___ ________ ____.
_________ ________ _______ _____ ___ ______ ____.
_____ ___ _________ ________ ________ ______.
_____ _________ __________ _____ ______ ______ _____.
__________ _____ ___ _________ _______ ______ _______ _________ ________ ___ __________ _________.
_______ __________ ______ _____ _____ _________ _______.
__________ _______ __________ ______ _________ ____ ___ __________ ______ ____ _______ ________.
________ ____ _________ ____ ____ _______ ___ _______ __________.
______ _______ ___ ______ _______ _____ ___ ______.
_____ ________ _____ ______ ________ _________ ____ ________ ____.
_______ ________ ______ ____ _____.
_____ ____ ________ ____ _________ ________ _________ _____ _______ ___.
____ ____ ______ __________ _______ ___ _________ ___.
__________ __________ ______ ____ __________ _________.
_______ _______ ____ _______ _______ _____ ________ ____ ______ ________.
____ ___ ______ _________ _____ ______ __________ _______.
_______ ______ ___ ________ ________ ___ _______ _______ ______ _______.
_____ _________ _____ ____ _______ _______ ____ _______ __________ ____.
________ __________ _________ _______ _______ _______ ________ _______ ______ ________ ______ ___.
___ ______ ________ ____ __________ _______ _______ __________ ______ _____.
____ ______ ___ ________ _________.
_____ _________ ______ ____ __________ _______ _____ _________ _________.
___ ________ ____ ___ ____ ___ ________.
______ ___ ________ ______ _______ ______ ________ ____ _______ ___ _______ ___.
_______ _____ _________ ________ ___ ____ _______ _________ ___.
_________ __________ ________ _________ __________.
____ ___ _____ ___ ______ ___ ____ _____ ____ _________ _________.
_______ ____ ________ ____ ______.
___ __________ ___ ____ _____ ________ ______ ______ ____ _______ _____.
_____ __________ ____ _______ __________ _____ _____ _____ ___ _________ ________ __________.
__________ _________ __________ ________ _____ ______ ________.
Skip in 10
In assembly language programming, particularly for the 8086 microprocessor, writing a program to calculate the sum and difference of two values stored in memory involves understanding the architecture of the 8086, including registers, memory addressing, and instruction set. The 8086 is a 16-bit microprocessor with a segmented memory architecture and provides general-purpose registers such as AX, BX, CX, DX, SI, DI, BP, and SP that are used for computation and memory manipulation. It also has segment registers CS, DS, ES, and SS, which are used to access different memory segments. To begin with, the first step in the program is to define the data segment. In the data segment, we declare two memory locations to store the values whose sum and difference we intend to calculate. For example, the memory locations can be labeled as `NUM1` and `NUM2`. Additionally, we also allocate memory to store the results of the sum and difference, which can be labeled as `SUM` and `DIFF`. The data segment may look like this: ``` DATA SEGMENT NUM1 DB 15H ; First value NUM2 DB 0AH ; Second value SUM DB ? ; To store sum DIFF DB ? ; To store difference DATA ENDS ``` The next step involves initializing the code segment, where the main logic of the program resides. The code segment begins with setting up the data segment register DS to point to the data segment. This is essential because most memory operations rely on the
________ ______ __________ _________ ________ ___ ________ ________ _______ _____.___ ______ ___ _________ ______ _________ ________ _______ ______ _______.
__________ _________ ________ __________ ___ ________ _______.
____ _____ _____ ___ ___ __________ ______.
________ _____ ______ __________ _______ __________.
__________ ______ _____ ____ ____ ______ _____ ____.
_______ __________ ________ _____ __________ _____ _____ ______ _______ ___.
____ ______ ____ _________ ___.
_______ ____ _________ ___ ____ ________.
___ __________ _________ ____ ______.
_____ __________ ________ ___ ______ ____ _________ ______ _________.
____ ___ _______ _________ ____ __________ _________ _____ ____ _________ _______.
________ ________ _________ ___ _____ ___.
_______ ____ ___ __________ _______ __________ _______ ___.
_______ ______ ______ ________ _____.
_______ ______ ________ _________ _________ _________ ____.
_____ _______ ___ ____ ______ _______ ____ ____ ______ __________ _____ _____.
_________ __________ ___ ___ _______ ____ ____ _______ ______ ______ ________.
___ ____ _________ ________ _______ ____ _____ __________ _______.
____ __________ _______ _____ _____ ______ ______ _______.
_________ _________ ______ ________ ______ _________.
__________ _________ _____ _________ ________ __________ ___ _________ _________ ___ ________ ______.
___ __________ ______ ___ ____ ______ ________ ___ __________ _____ ______ ______.
__________ ________ ___ _________ ________.
_______ ________ __________ ___ ___ _____ ____ _______ __________ __________ _____ _______.
__________ ________ ______ ____ ___ ___ _________ _________ __________ _________ _________.
___ _______ ____ _______ __________ _______ __________ _____ ____ ____ _________.
__________ _________ __________ __________ ______ ___ _________.
_____ _________ _____ _______ _________ _________ ___ ________ _______ __________.
__________ _________ _____ ________ _______ _____ ______ _____ _______ ________.
_______ __________ _____ ______ _____ ______.
_______ ___ ________ ___ _________ ___ _____ _____.
________ __________ _______ _______ __________ _________ ___ _______ _______ _____ ________ ____.
____ ___ _____ _____ ________ ___ ___ ______ ________ _______ ___ ____.
_____ ____ _________ ________ ______ _____ _____ _______ ____ _______.
____ ____ __________ _________ ___.
___ _____ ____ ____ ___ ______.
__________ ______ _____ ________ ___ ____ ______ ______ _________ _________.
_______ ______ ________ _________ _____ ___ ___ ____ _______ __________ ______.
____ __________ _______ _____ ________ _________ ________ _____ __________ _____.
______ _________ ___ _________ ____ ___ _______ ___ ________ __________ ________.
______ ________ __________ _____ ___ ____ ___ ________ ____.
_________ ________ _______ _____ ___ ______ ____.
_____ ___ _________ ________ ________ ______.
_____ _________ __________ _____ ______ ______ _____.
__________ _____ ___ _________ _______ ______ _______ _________ ________ ___ __________ _________.
_______ __________ ______ _____ _____ _________ _______.
__________ _______ __________ ______ _________ ____ ___ __________ ______ ____ _______ ________.
________ ____ _________ ____ ____ _______ ___ _______ __________.
______ _______ ___ ______ _______ _____ ___ ______.
_____ ________ _____ ______ ________ _________ ____ ________ ____.
_______ ________ ______ ____ _____.
_____ ____ ________ ____ _________ ________ _________ _____ _______ ___.
____ ____ ______ __________ _______ ___ _________ ___.
__________ __________ ______ ____ __________ _________.
_______ _______ ____ _______ _______ _____ ________ ____ ______ ________.
____ ___ ______ _________ _____ ______ __________ _______.
_______ ______ ___ ________ ________ ___ _______ _______ ______ _______.
_____ _________ _____ ____ _______ _______ ____ _______ __________ ____.
________ __________ _________ _______ _______ _______ ________ _______ ______ ________ ______ ___.
___ ______ ________ ____ __________ _______ _______ __________ ______ _____.
____ ______ ___ ________ _________.
_____ _________ ______ ____ __________ _______ _____ _________ _________.
___ ________ ____ ___ ____ ___ ________.
______ ___ ________ ______ _______ ______ ________ ____ _______ ___ _______ ___.
_______ _____ _________ ________ ___ ____ _______ _________ ___.
_________ __________ ________ _________ __________.
____ ___ _____ ___ ______ ___ ____ _____ ____ _________ _________.
_______ ____ ________ ____ ______.
___ __________ ___ ____ _____ ________ ______ ______ ____ _______ _____.
_____ __________ ____ _______ __________ _____ _____ _____ ___ _________ ________ __________.
__________ _________ __________ ________ _____ ______ ________.
IGNOU ACADEMY
Your IGNOU journey, made easier.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
Continue Reading — It's Free
Sign in with Google to unlock more of this answer.
✓ Free access
✓ Unlock up to 60% of the answer
✓ No payment required
✓ Unlock up to 60% of the answer
✓ No payment required
Quick Google sign-in. No separate registration form.