PROGRAM NO.1
OBJECT: Write a program to add two 16 bit hexadecimal numbers without carry.
INSTRUMENT REQUIRED: 8086 Microprocessor Trainer Kit.
PROGRAM:
| MEMORY LOCATION | MACHINE CODE | OPCODE | OPERAND |
| 0206 | BE0002 | MOV | SI,0200H |
| 0209 | 8B04 | MOV | AX,[SI] |
| 020B | 46 | INC | SI |
| 020C | 46 | INC | SI |
| 020D | 8B1C | MOV | BX,[SI] |
| 020F | 03C3 | ADD | AX,BX |
| 0211 | BF0402 | MOV | DI,0204H |
| 0214 | 8905 | MOV | [DI],AX |
| 0216 | F4 | HLT |
DESCRIPTION:
To solve the given objective, we have taken two hexadecimal numbers in the memory locations of 0200H and 0202H and added them and stored the result in the memory location of 0204H.
To solve the given objective, we have taken the following steps:
- Move the source index register (SI) pointer to the location of the first number.
- Store the first number in the AX register using SI.
- Double increment the SI pointer to point to the memory location of the second number.
- Store the second number in the BX register using SI.
- Now apply ADD operation to add the numbers in the registers AX and BX and store the result in AX.
- Move the destination index (DI) pointer to point to the memory location where the
result is to be stored. - Finally move the result from the AX register to the destination using DI 8. HLT to Halt or End the program.
INPUT VALUE
| MEMORY LOCATION | VALUE |
| 0200H | 10 |
| 0201H | 3A |
| 0202H | 1C |
| 0203H | 2B |
| 0204H | 00 |
| 0205H | 00 |
OUTPUT
| MEMORY LOCATION | VALUE |
| 0204H | 2C |
| 0205H | 65 |
RESULT: The addition of the two hexadecimal numbers 3A1CH and 2B1CH yielded 652CH
COMMENTS:
1. MOV SI, 0200H: 16 bit data can be moved using immediate addressing . 0200 is moved to source index.
2. ADD AX, BX: contents in the accumulator and the base register are added.
3. INC SI: The content of a specified 8-bit or 16-bit register or memory location(s) is incremented by one by this instruction.
4. HLT: This instruction stops program execution. The processor stops fetching and executing instructions.
FLOWCHART:

Most Important Question for Exam
All of these
A and B
Data
All of these
A and B
Binary codec decimal
All of these
Stack
Pushing Data
Von Neumann
32
RESET
Programmable read-only memory
Erasable Programmable read only memory
Both B & C
All of these
All of these
Both B & C
Mask ROM
Static RAM
Dynamic RAM
Dynamic RAM
Main Memory
Address Bus
Write
Read
Bus interface unit
Execution unit
All of these
General-purpose register
Related Link
- 8086 Instruction Hex Code
- Write a program to two add 16 bit Hexadecimal numbers without carry.
- Write a program to two add 16 bit Hexadecimal numbers with carry.
- Write a program to find the greatest number from an array of 10 numbers.
- Write a program to calculate the factorial of a number.
- Write a program to multiply two 16-bit numbers result should be greater than 16 bit.
- Write a program to input 5 numbers and arrange them in descending order.
- Write a program to convert the string data it’s Two’s complement form.
- Write a program to read 8 bit data from Port B. Complement this data & send it back to Port A of
- Write a program to move a block of data from one memory location to another. Input Value
- Write a program to find Gray code equivalent of a Binary number using Lookup Table.
- Microprocessor 8086 Video Play List
We have detected an adblocker in your browser,
please consider supporting us by disabling your ad blocker.
