Professional Documents
Culture Documents
A
PROJECTREPORT ON
“Find the factorial of given number”
UNDER THE GUIDANCE OF
MRS.S.S.Tone
Page | 1
Certificate
This is to certify that group NO. G13 Roll No. 2148,2149,2150,2151 of 4 Semester of
Diploma in Computer Engineering of Institute, Dr. D. Y. Patil Polytechnic (Code : 0539 ) has
completed the Micro Project satisfactorily in Subject – Microprocessor (22415) for the
academic year 2020-2021 as prescribed in the curriculum.
Place: Kolhapur
Page | 2
ACKNOWLEDGMENT
The success & find outcome of this project required a lot of guidance &
assistance from many people and I am extremely privileged to have got
all along the completion of our project. All that we have done is only due
to such supervision & assistance & I would not forget to thanks them.
Date:
Place: Kolhapur.
Page | 3
INDEX
SR.NO. CONTENT
1 Introduction
2 Aim
3 Course Outcome
4 Algorithm
5 Flowchart
6 Source code
7 Output
8 Conclusion
9 Reference
Page | 4
INTRODUCTION
Page | 5
AIM
Develop a program for Find the factorial of given number
It is an assembly language program in which we develop a program for find the
factorial of given number IN 8086 microprocessor. In that we call a fact method for
find the factorial. Procedures or subroutines are very important in assembly
language, as the assembly language programs tend to be large in size. so in program
we use procedure for find the factorial.
COURSE OUTCOME
a. Analyse the functional block of 8086 microprocessor.
b. Write assembly language program for the given problem.
c. Use instructions for different addressing modes.
d. Develop an assembly language program using assembler.
e. Develop assembly language programs using procedures, macros and modular
programming approach.
Page | 6
ALGORITHM
STEP 1: Input the Number whose factorial is to be find and Store that Number in CX
Register (Condition for LOOP Instruction)
STEP 3: Multiply CX with AX until CX become Zero (0) using LOOP Instruction
Page | 7
FLOWCHART
Page | 8
SOURCE CODE
data segment
num db 04h
Fact dw 00h
data ends
code segment
assume cs:code,ds:data
mov ax,data
mov ds,ax
mov al,num
mov cl,num
call Fact
dec cl
int 03h
code ends
end
Fact proc
mov bl,al
up:dec bl
mul al
loop up
mov Fact,ax
ret
endp
Page | 9
OUTPUT:
G CS: 001B
AX=0078 BX=0000 CX=0001 DX=0000 SP=0000 BP=0000 SI=0000
DI=0000
DS=0BA8 ES=0B98 SS=0BA8 CS=0BA9 IP=001B NV UP EI PL ZR NA PE NC
0BA9:001B B44C MOV AX,0000
Page | 10
CONCLUSION
Page | 11
REFERENCE
https://www.tutorialspoint.com/microprocessor/
microprocessor_8086_instruction_sets.htm
https://www.tutorialspoint.com/assembly_programming/
assembly_procedures.htm
https://www.geeksforgeeks.org/8086-program-find-factorial-number/
Page | 12