0% found this document useful (0 votes)
47 views5 pages

Dr. B.R. Ambedkar National Institute of Technology, Jalandhar

The document provides an algorithm and 8085 assembly code to calculate and display the first 10 numbers of the Fibonacci series. It initializes registers with the first two numbers of the series (0 and 1). It then uses a loop to add the last two numbers, store the result in memory, and update the registers. This is repeated until the counter reaches 0, generating the first 10 Fibonacci numbers and storing them sequentially in memory. A flowchart depicts the program flow. The output displayed is the 10 numbers of the Fibonacci series stored in memory locations.

Uploaded by

Pranav Shukla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views5 pages

Dr. B.R. Ambedkar National Institute of Technology, Jalandhar

The document provides an algorithm and 8085 assembly code to calculate and display the first 10 numbers of the Fibonacci series. It initializes registers with the first two numbers of the series (0 and 1). It then uses a loop to add the last two numbers, store the result in memory, and update the registers. This is repeated until the counter reaches 0, generating the first 10 Fibonacci numbers and storing them sequentially in memory. A flowchart depicts the program flow. The output displayed is the 10 numbers of the Fibonacci series stored in memory locations.

Uploaded by

Pranav Shukla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

DR. B.R.

AMBEDKAR NATIONAL INSTITUTE OF


TECHNOLOGY, JALANDHAR

MICROPROCESSOR AND INTERFACING LAB


LAB ASSIGNMENT 6

SUBMITTED TO:
DR. SATHIYA S

SUBMITTED BY:
 PARTH SHINH
18106052
 PIYUSH GUPTA
18106053
 PRABHLEEN KAUR
18106054
ICE 3RD Year

Group: G3-C
QUESTION 1:
 AIM:
To write 8085 instruction sequence to calculate and display Fibonacci Series for first 10
numbers. Store the numbers sequentially in the memory.

 PLATFORM REQUIRED:
SIM8085

 ALGORITHM OF THE PROGRAM:


1. First Initialize the memory from where you want to start the program i.e.0000H in
this case
2. Then move number 00H and 01H to B and C register respectively and set the counter
value in register D i.e. where you want to terminate the program.
3. Then move our first number to the memory and increment the memory location and
place second number in memory.
4. Then initialized loop and move one of the register content into accumulator for
performing operation i.e. Add last two values of series and store result in memory.
5. As the loop is proceeding increment memory location and start decreasing counter.
6. As counter reaches to zero, loop will terminate and we get Fibonacci series as
resultant.

 PROGRAM SEQUENCE IN MNEMONICS:

LXI H,0000H
MVI B,00H
MVI C,01H
MOV M,B
INX H
MOV M,C
INX H
MOV A,B
MOV B,C
MVI D,08H
L1:ADD B
MOV M,A
INX H
MOV C,A
MOV A,B
MOV B,C
DCR D
JNZ L1
HLT
 FLOWCHART:
START

Set Memory Location where to start series

Load 00H,01H to register and then store them to memory

Load one of register content to AC

Set Counter to 08H

Add Content of one Register and AC

Store Result in memory

Increment Memory location

Swap content of register and AC

Decrement Counter

If counter
reaches to YES HLT
NO
zero
 PROGRAM OUTPUT:
 RESULT:
Fibonacci Series of first 10 numbers is generated.

You might also like