Sie sind auf Seite 1von 6

Microprocessor & Control Experiment No.

Experiment No. 2
1.0 Title :
Addition of two 8 bit binary numbers and addition of two 16 bit binary numbers.

2.0 Prior Concepts :


2.1 Architecture of 8085 microprocessor.
2.2 Addressing modes of 8085 microprocessor.
2.3 Instruction set of 8085 microprocessor.

3.0 New concepts :


Proposition 1 :
For 8-bit binary addition if result is 8-bit then use ADD instruction in the program and when
result is greater than 8-bit (for successive / series addition) then use ADC instruction in program.
Proposition 2 :
If result is greater than 8-bit then one register should be initialized to take care of carry bit.
Proposition 3 :
New information:
The programming process

Proposition 4 : Programming sheet layout

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION o 9


Experiment No. 2 Microprocessor & Control

4.0 Learning Objectives :


Intellectual skills & Motor skills:
a. Analyze the program statement.
b. Develop algorithm.
c. Write assembly language program and hand assemble the program.
d. Enter machine code (hexadecimal code) of program in RAM.
e. Enter data and execute the program.

5.0 Equipment :
The 8085 microprocessor kit along with its power supply unit.

6.0 Stepwise procedure :


6.1 Development of program for addition of two 8 bit binary numbers
6.1.1 Program statement:
Add two 8-bit binary numbers stored at memory location 20C1 H and 20C2 H. Store result at
memory location 20C0 H.
6.1.2 Algorithm:
1. Load the address of first number in H-L pair.
2. Get first number in accumulator.
3. Get address of second number in H-L pair.
4. Add two numbers.
5. Store result at specified memory location.
6. Stop execution of program.
6.1.3 Flowchart:

10 o MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


Microprocessor & Control Experiment No. 2

6.1.4 Assembly Language Program Sheet:


Note: 1. Student is expected to write machine code for each instruction. Opcode sheet is
provided on the last sheet of this laboratory manual. Memory addresses are to be
written according to the memory available for the program memory (RAM area) in
the Microprocessor kit.
2. User can terminate the program either by HLT (Halt) or RST1 (Restart) instruction.
For this it is recommended to refer the user's manual of the Microprocessor kit
available.

6.1.5 Result :

(Fill in the details for three sets of data)

6.2 Development of program for addition of two 16-bit binary numbers.


6.2.1 Program Statement:
Add two sixteen bit numbers stored at memory location 20C2 H and 20C4 H. Store result at
memory locations 20C0 H and 20C1 H.
6.2.2 Algorithm :
(1) Get the first number in H-L pair.
(2) Move first 16 bit number in D-E register pair.
(3) Get second 16-bit number in H-L register pair from memory location.
(4) Add two 16-bit numbers.
(5) Store the result at memory location.
(6) Stop execution of program.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION o 11


Experiment No. 2 Microprocessor & Control

6.2.3 Flowchart :

6.2.4 Assembly Language Program :

7.0 Result :

(Fill in the details for three sets of data)

Dated signature of subject teacher

12 o MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


Microprocessor & Control Experiment No. 2

8.0 Questions :
(Note :- Student to answer Q ……. , Q ………. , Q ………. And the question numbers
shall be allotted by the teacher.)
8.1 What modifications are suggested for the addition of two 8-bit binary numbers for result
more than 8-bit?
8.2 Repeat the program of addition of two 8-bit numbers using indirect addressing mode.
8.3 Perform Decimal addition of two Decimal numbers stored at memory location 20C0H and
20C1H and store the result at 20C2H & 20C3H.
8.4 Write on ALP for addition of two, sixteen bit numbers using ADC Instruction.
8.5 What will be content of accumulator and carry flag after execution of ADI01H and INR A
instruction, if A= FF H
8.6 Write an ALP for addition of series of primary numbers.

(Space for Answers)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION o 13


Experiment No. 2 Microprocessor & Control

Space for Answers

Date :-

Signature of Subject Teacher

14 o MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

Das könnte Ihnen auch gefallen