100% found this document useful (2 votes)
6K views8 pages

MIC Micro Project (10,31,33,45)

This assembly language program calculates the factorial of a number using an 8086 microprocessor. It takes the number as input from memory location 0500 and stores it in the CX register. It initializes the AX and DX registers to 0001 and 0000 respectively. It then uses a LOOP instruction to multiply the contents of CX and AX, storing the result in DX:AX, until CX becomes zero. Finally, it stores the factorial result from the AX and DX registers to memory locations 0600 and 0601 before halting the program. The program utilizes the 8086's direct MUL instruction to efficiently calculate the factorial without needing multiple ADD instructions.

Uploaded by

sakshi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
6K views8 pages

MIC Micro Project (10,31,33,45)

This assembly language program calculates the factorial of a number using an 8086 microprocessor. It takes the number as input from memory location 0500 and stores it in the CX register. It initializes the AX and DX registers to 0001 and 0000 respectively. It then uses a LOOP instruction to multiply the contents of CX and AX, storing the result in DX:AX, until CX becomes zero. Finally, it stores the factorial result from the AX and DX registers to memory locations 0600 and 0601 before halting the program. The program utilizes the 8086's direct MUL instruction to efficiently calculate the factorial without needing multiple ADD instructions.

Uploaded by

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

MICRO PROJECT

REPORT
MAHARASHTRASTATEBOARDOFTECHNICALEDUCATION

GURUGOBINDSINGHPOLYTECHNIC,NASHIK

MICRO PROJECT
Academicyear:2020-21

TITLEOFPROJECT
Factorial Of a Number
Program:Computer Engineering

Programcode:CO

Course:Microprocessor
Coursecode: 22415
MAHARASHTRA STATEBOARD OF
TECHNICALEDUCATION

Certificate

This is to certify that Mr. /Ms.


Roll
Sr. No Name of Student
No
1 Pranali Nere 10
2 Siddhi Nikam 31
3 Sakshi Baviskar 33
4 Samruddhi Bhamre 45
Of Fourth semester of Diploma in Computer Engineeringof
InstituteGuruGobindSinghPolytechnic,Nashik(InstituteCode:0369)hascompletedtheMic
roProjectsatisfactorilyinSubject–Microprocessor’(22415)fortheacademicyear2020-
2021asprescribedin the curriculum.
Sr. No Enrollment No. Exam Seat No.
1 1903690086
2 1903690107  
3 1903690109  
4 1903690121  

Place: Nashik Date:

SubjectTeacher Head of the Principal


Department
MAHARASHTRASTATEBOARDOFTECHNICALEDUCATION

GURUGOBINDSINGHPOLYTECHNIC,NASHIK

MICRO PROJECT
Academicyear:2020-21

TITLEOFPROJECT
Factorial Of a Number
Program:ComputerEngineering
Programcode:CO

Course:Microprocessor
Coursecode:22415
NameofGuide:Mr. C. R. Ghuge

GroupDetails:
Sr.N Nameofgroup members RollNo. EnrollmentNo. SeatNo.
o
1. Pranali Nere 10 1903690086
2. Siddhi Nikam 31 1903690107
3. Sakshi Baviskar 33 1903690109
4. Samruddhi Bhamre 45 1903690121
ANNEXUREII

EvaluationSheetfortheMicroProject

AcademicYear:2020-21 Nameof theFaculty:Mr. C. R. Ghuge


Course:Microprocessor Coursecode:22415 Semester:IV

Title of the project: Factorial Of Number

CosaddressedbyMicroProject:
a. Analyzethefunctionalblockdiagramof8086.
b. WriteanALPforgivenproblem.
c. Useinstructionsfordifferentaddressingmodes.
d. DevelopanALPusingassembler.
e. DevelopanALPusingprocedure,macros&modularprogrammingapproach.
Majorlearningoutcomesachieved bystudents bydoingtheproject

(a) Practicaloutcome:
1. IdentifyvariouspinsofgivenMicroprocessor.
2. Useassemblylanguageprogrammingtools&functions.
3. Useinstructionsfordifferentaddressingmodesinaprogram.
4. WriteanALPtoadd,subtract, multiply,dividetwoBCDnumbers.
(b) Unitoutcomes inCognitivedomain:
1) Describethefunctions ofthegivenpins.
2) UsetheALPtoolsto developacodeofthegivenapplication.
3) Describethegivenaddressingmodelwithexamples.
4) Developprogramforthegivenproblem.
5) DevelopanALPusingprocedureforthegivenproblem.
(c) OutcomesinAffectivedomain:
1) Followsafetypractices.
2) Practicegoodhousekeeping.
3) Demonstrateworkingasaleader/ateammember.
4) Maintaintoolsandequipment.
5) Followethicalpractices.
Comments/suggestionsaboutteamwork/leadership/inter-personalcommunication (ifany)
---------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
-

Marks out of Marks out of


6for 4forperformance
Roll StudentName performanceing inoral/ Total out
No roupactivity(D5 presentation(D5 of10
Col.8) Col.9)

Pranali Nere
10
Siddhi Nikam
31
Sakshi Baviskar
33
Samruddhi Bhamre
45

Mr. C. R. Ghuge
(Name&SignatureofFaculty)
Write an assembly language program for
calculating the factorial of a number using 8086
microprocessor
Important –
If the Given Number is a 16-bit number, the AX register is automatically used as the
second parameter and the product is stored in the DX:AX register pair. This means that the
DX register holds the high part and the AX register holds the low part of a 32-bit number .

In 8086 microprocessor, user have direct instruction (MUL) to multiply two numbers, so
we don’t have to add Multiplicand by Multiplier times like in 8085
Advantage of 8086 over 8085 (In case of Multiply):
 Don’t have to write a bulky code as 8086 has a small code
 Easy to remember
 Already have multiplication Instruction
Algorithm –
1. Input the Number whose factorial is to be find and Store that Number in CX
Register (Condition for LOOP Instruction)
2. Insert 0001 in AX(Condition for MUL Instruction) and 0000 in DX
3. Multiply CX with AX until CX become Zero(0) using LOOP Instruction
4. Copy the content of AX to memory location 0600
5. Copy the content of DX to memory location 0601
6. Stop Execution
Program –

ADDRESS MNEMONICS COMMENTS

0400 MOV CX, [0500] CX <- [0500]

0404 MOV AX, 0001 AX <- 0001


ADDRESS MNEMONICS COMMENTS

0407 MOV DX, 0000 DX <- 0000

040A MUL CX DX:AX <- AX * CX

040C LOOP 040A Go To [040A] till CX->00

0410 MOV [0600], AX [0600]<-AX

0414 MOV [0601], DX [0601]<-DX

0418 HLT Stop Execution


Explanation –
1. MOV CX, [0500] loads 0500 Memory location content to CX Register
2. MOV AX, 0001 loads AX register with 0001
3. MOV DX, 0000 loads DX register with 0000
4. MUL CX multiply AX with CX and store result in DX:AX pair
5. LOOP 040A runs loop till CX not equal to Zero
6. MOV [0600], AX store AX register content to memory location 0600
7. MOV [0601], DX store DX register content to memory location 0601
8. HLT stops the execution of program

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy