0% found this document useful (0 votes)
24 views2 pages

Experiment 1: Example Program Objective Flow-Chart

The document describes an 8-bit addition experiment using 8085 assembly code. It stores two 8-bit numbers at memory locations 4150h and 4151h, adds them together, and stores the 8-bit result at 4152h. It then provides two additional exercises: rewriting the program to store results greater than 8 bits, and performing 8-bit subtraction. It also provides three exercises for the 8086: 32-bit subtraction, 16-bit multiplication, and 32-bit division with a 16-bit divisor.

Uploaded by

sudarsaniiit
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views2 pages

Experiment 1: Example Program Objective Flow-Chart

The document describes an 8-bit addition experiment using 8085 assembly code. It stores two 8-bit numbers at memory locations 4150h and 4151h, adds them together, and stores the 8-bit result at 4152h. It then provides two additional exercises: rewriting the program to store results greater than 8 bits, and performing 8-bit subtraction. It also provides three exercises for the 8086: 32-bit subtraction, 16-bit multiplication, and 32-bit division with a 16-bit divisor.

Uploaded by

sudarsaniiit
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

EXPERIMENT 1

Example Program: 8-bit Addition

Objective: Add two 8-bit numbers residing at memory locations 4150h and 4151h respectively. Store
the result at memory location 4152h.

Flow-chart

Program

Memory Address Hex code Mnemonics Comments


4100 3A LDA 4150 (4150) => (A) =23
4101 50
4102 41
4103 47 MOV B,A (A) => (B)
4104 3A LDA 4151 (4151) => (A) = 45
4105 51
4106 41
4107 80 ADD B (A) + (B) => A
4108 32 STA 4152 (A) => (4152) =68
4109 52
410A 41
410B 76 HLT

Result

Data : (4150) = 23h


(4151) = 45h
Result : (4152) = 68h
8085

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

You might also like