際際滷

際際滷Share a Scribd company logo
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
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
Results:
In each debugging,
ns value is at 1414:2000.
n-th Fibonacci number is at 1414:2030
For n=6

For n=7
For n=8

For n=9

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
  • 3. Results: In each debugging, ns value is at 1414:2000. n-th Fibonacci number is at 1414:2030 For n=6 For n=7