This document summarizes an experiment on microprocessors and interfacing devices conducted by a student. The objective was to become familiar with a microprocessor trainer and load simple programs. Specifically, the student wrote an assembly language program to calculate the nth Fibonacci number by storing the previous two numbers and recursively adding them to generate the next number. The program was tested for different values of n and the results were as expected.
1 of 4
More Related Content
eee316 exp01
1. Department of Electrical and Electronic Engineering
Bangladesh University of Engineering and Technology
Group No.: 05
Course No.: EEE 316
Course Name: Microprocessor
and Interfacing Sessional.
Experiment No.: 01
Experiment Name:
Basic idea of microprocessors and interfacing devices.
Assembly language introduction and elementary commands.
Date of Performance: 19/11/2013
Date of Submission: 26/02/2013
Name: Musbiha
Level: 3 Term: 2
Section:
Binte Wali
A1
Student No.: 0906022
2. Objective:
The objective of this experiment is to be familiarized with microprocessor trainer
and loading some simple programs in the kit.
Task: To write complete assembly language for the operation
of finding out n-th Fibonacci number
Code:
CODE SEGMENT
ASSUME CS:CODE, DS:CODE
;
ORG 1000H
;
MAIN: MOV AX, CS
MOV DS, AX
;
MOV CX,n ;n is the index of the fib no.
beginloop:
MOV AX,DATA1
ADD AX,DATA2
MOV BX,DATA2
MOV DATA2,AX
MOV DATA1,BX ;DATA1 is n-th fib no.
loop beginloop
;
MOV AH, 4CH
INT 21H
;
ORG 2000H
n DW 8H
ORG 2030H
DATA1 DW 0H
ORG 2070H
DATA2 DW 1H
;
CODE ENDS
END
END MAIN