You are on page 1of 5

EXPERIMENT -4

AIM: Write a program to generate Fibonacci series by using 8085.


REQUIREMENT:
8085Simulator IDE Software.
PROCEDURE:

1. Go to the Tools and select the Assembler.


2. Write a code in assemble window.
3. Go to the tools and select Assemble & load in Assembler window or F8.
4. Check if any error and fix.
5. After this, go to 8085 Simulator IDE and open Simulation then start or F1.
6. Now, again go to the Memory Editor from Tools option to get the output at the
defined addresses.

Address Mnemonics Operands Comments


0000H MVI D,08H Assigns 08 to D.

0002H MVI B,00H Assigns 00 to B.

0004H MVI C01H


Assigns 01 to C.

0006H LXI 0070H Assigns 30 to H and 50


to L.

0009H MOV M,B Move the content of B


in M .
000AH DCR D Decrement D by 1.

000BH INX H Increment M by 1.


000CH MOV M,C
Move the content of C in
M.

000DH MOV A,B Move content of B in


A.
000EH ADD C
Add the content of C and
A and store the result in A.

000FH MOV B,C Move content of C in


B.
0010H MOV C,A Move content of A in
C.
0011H DCR D Decrements D by 1
0012H JNZ 000BH Jump to memory
location
0015H HLT HLT

ASEMBLER
FLOWCHARTS :- START

Initialize counter to display numbers in series

Initialize register B to store the previous number

Initialize register C to store the current number

Add two numbers

Assign current number to previous number

Save result as new current number

Decrement Counter

If
Counter
=O

Stop
OUTPUT:-

Before Execution After Execution

0070H=00H 0070 -00H


0071 -01H
0072 -01H
0073 –02H
0074 -03H
0075 -05H
0076 –08H
0077 –0DH
RESULT:- Generation of Fibonacci Series has been implemented successfully.

You might also like