PROGRAM NO.5
OBJECT:Write a program to multiply two 16-bit numbers; result should be greater than 16 bits.
INSTRUMENT REQUIRED: 8086 Microprocessor Trainer Kit.
PROGRAM:
MEMORY LOCATION | MACHINE CODE | OPCODE | OPERAND |
0208 | BE 00 02 | MOV | SI,0200H |
020B | 8B 04 | MOV | AX,[SI] |
020D | 46 | INC | SI |
020E | 46 | INC | SI |
020F | 8B 1C | MOV | BX,[SI] |
0211 | F7 E3 | MUL | BX |
0213 | BF 04 02 | MOV | DI,0204H |
0216 | 89 05 | MOV | DI,[AX] |
0218 | 47 | INC | DI |
0219 | 47 | INC | DI |
021A | 89 15 | MOV | [DI],DX |
021C | F4 | HLT |
DESCRIPTION:
To solve the given objective we have taken two hexadecimal numbers in the memory locations of 0200H and 0202H and multiplied them and stored the result in the memory location of 0204H and the remaining number in the DX register which is then transferred top the memory location of 0206H.
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 next number.
- Store the first number in the BX register using SI.
-
Now apply MUL operation to multiply the numbers in the registers AX and BX and store the result in AXMove the destination index (DI) pointer to point to the memory location where the result is to be stored.
- Move the result from the AX register to the destination using DI.
- Move the destination index (DI) pointer to point to the memory location where the remaining 16 bit number is to be stored.
- Finally move the result from the DX register to the destination using DI and Halt.
INPUT VALUE:
MEMORY LOCATION | VALUE |
0200H | 04 |
0201H | 00 |
0202H | 08 |
0203H | 00 |
0204H | 00 |
0205H | 00 |
0206H | 00 |
0207H | 00 |
OUTPUT:
MEMORY LOCATION | VALUE |
0204H | 20 |
0205H | 00 |
0206H | 00 |
0207H | 00 |
RESULT:The multiplication of the two numbers 0004H and 0008H yielded 0020H as the result and 0000H as the remaining bits.
COMMENTS:
- MOV SI, 0200H: 16 bit data can be moved using immediate addressing. 0200 is moved to source index.
- MUL BX: This instruction is used for the multiplication of 2 unsigned numbers. It multiplies the content of BX with AX and stores in AX.
- INC DI: The content of a specified 8-bit or 16-bit register or memory location(s) is incremented by one by this instruction.
- HLT: This instruction stops program execution. The processor stops fetching and executing instructions.
FLOWCHART:

Most Important Question for Exam
Memory
1024 megabytes
CPU
MOS
Metal oxide semiconductor
Digital signals
Accumulator
B & C
Program Counter
Fetching
12-bit
2
C & D
Load Counter
Instruction register
Both A & B
Low Memory
Stack Pointer Register
Nibble
Hexadecimal
Most significant digit
65536
Data Bus
Control Bus
Input
Output
All of these
Direct Memory Access
Both A & B
Isolated I/O
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