Experiment 1: Example Program Objective Flow-Chart
Experiment 1: Example Program Objective Flow-Chart
Objective: Add two 8-bit numbers residing at memory locations 4150h and 4151h respectively. Store
the result at memory location 4152h.
Flow-chart
Program
Result
1. Rewrite the above program to store the result that is greater than 8-bits. For example :
Data : (4150) = FF
(4151) = FF
Result : (4152) = FE
(4153) = 01
2. Perform 8-bit subtraction of two data stored at memory locations 4150h and 4151h using
“SUB M” command.
8086
1. Subtract two 32-bit numbers and store the result in memory. The input data is also to be fetched
from memory.
Minuend : [1100] = 5678
[1102] = 123A
Subtrahend: [1104] = 123A
[1106] = 5678
Result: [1200] = BCC1
[1202] = 443E
2. Multiply two 16-bit numbers and store result back in memory.
Input: [1100] = FEDC
[1102] = BA98
Result: [1200] = B9C3
[1202] = 2AA0
3. Divide a 32-bit number by a 16-bit number and store the quotient and remainder in memory.
Dividend: [1100] = 0000
[1102] = FFFF
Divisor: [1104] = FFFF
Quotient: [1200] = 0001
Remainder: [1202] = 0000