Read without ads and support Scribd by becoming a Scribd Premium Reader.
Ex.No.2
ADDITION OF TWO 8 BIT NUMBERS
Aim:
To write a program for adding the given two 8- bit number and store the result
in the memory .
Specifications:
Microprocessor
:Intel 8085
Operating Frequency :3.012MHz
User RAM Area
:4100-5FFF
Algorithm:

1. Load the accumulator by data in the address 4200H
2. Move the contents of the accumulator to B Register
3. Load the accumulator by data in the address 4201H
4. Clear C Register
5. Add the content of the accumulator to B Register content
6. If no carry jump to loop
7. Increment C Register
8. Shift the content of the accumulator to the location 4203
9. Move the contents of the C Register to accumulator.
10. Shift the content of the accumulator to the location 4204
11. Hault the current Program

Program:
Procedure:
1. Key in opcode from the address specified
2. Enter data to 4200, 4201.
3.Execute the program and check the result at 4202 and 4203.
Result:Thus the 8-bit addition with carry is performed.
CONTENT
ADDRESS FIELD
DATA FIELD
INPUT FIELD
4200
04H
4201
09H
OUTPUT FIELD
4202
0DH
4203
00H
ADDRESS
HEX
CODE
LABEL MNEMONICS
OPERAND
COMMENTS
4100
3A,00,42
LDA
4200
Load the accumulator with
data in 4200
4103
47
MOV
B,A
Move the contents of the
accumulator to B Register
4104
3A,01,42
LDA
4201
Load the accumulator with
data in 4201
4107
0E,00
MVI
C,00
Clear C Register
4109
80
ADD
B
Add the content of the B
Register to accumulator.
410A
D2,0E,41
JNC
loop
If no carry jump to loop
410D
0C
INR
C
Increment C Register
410E
32,02,42
Loop
STA
4202
Shift the content of the
accumulator to the location
4202
4111
79
MOV
A,C
Move the contents of the C
Register to the accumulator.
4112
32,03,42
STA
4203
Shift the content of the
accumulator to the location
4203
4115
76
HLT
Stop the current Program
Ex.No.3
ADDITION OF TWO 16 BIT NUMBERS
Aim:
To write an assembly language program to add the given two 16- bit number
with carry and store the result in the memory .
Specifications:
Microprocessor
:Intel 8085
Operating Frequency :3.012MHz
User RAM Area
:4100-5FFF
Algorithm:

1. Load the LSB of first data accumulator
2. Move it to B Register
3. Load the LSB of the second data in accumulator
4. Add the content of the accumulator and B Register.
5. Store the result in the given location
6. Load the MSB of the first data in the accumulator.
7. Move it to B Register
8. Load the MSB of the second data in accumulator
9. Add the content if no carry jump to address specified
10. If carry exist increment C Register
11. Shift the content of the accumulator to the desired location
12. Move the contents of the C Register to accumulator.
13. Shift the content of the accumulator to the desired location
14. Hault the current Program

Search History:
Searching...
Result 00 of 00
00 results for result for
  • p.
  • More From This User

    Notes
    Load more