answersLogoWhite

0


Best Answer

Source program

LXI SP, 27FFH ; Initialize stack pointer

LDA 2200H ; Get the number

CPI 02H ; Check if number is greater than 1

JC LAST

MVI D, 00H ; Load number as a result

MOV E, A

DCR A

MOV C,A ; Load counter one less than number

CALL FACTO ; Call subroutine FACTO

XCHG ; Get the result in HL

SHLD 2201H ; Store result in the memory

JMP END

LAST: LXI H, 000lH ; Store result = 01

END: SHLD 2201H

HLT

Subroutine Program:

FACTO:LXI H, 0000H

MOV B, C ; Load counter

BACK: DAD D

DCR B

JNZ BACK ; Multiply by successive addition

XCHG ; Store result in DE

DCR C ; Decrement counter

CNZ FACTO ; Call subroutine FACTO

RET ; Return to main program

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Compute the factorial of n using 8085 microprocessors?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Why 8085 named so?

it is the standard usded by the INTEL to categorize their microprocessors.


What is the instruction for exit in 8085 microprocessors?

There is no exit instruction in the 8085. Do you mean return, as in from a function or interrupt? If so, the instruction is RET.


What are 10 microprocessors?

Ten microprocessors are the 4004, 4040, 8008, 8080, 8085, 8086, 8088, 80286, 80386, and 80486.There are many more, and this list only included some of the Intel microprocessors, in mostly historical order.


What are the examples of microprocessors?

E.g. 8085, 8086, 8255, 8051, 6800, 8257, 8251 and many more...


Why you use LXI SP command for factorial in 8085 assembly language?

It's up to you: don't use it, if you don't want.


Main difference between 8085 and 8086?

The most significant difference between the Intel 8085 and 8086 microprocessors is that the 8085 is an 8-bit system and the 8086 is a 16-bit system. This difference allows the 8086 system to have a much larger set of operational instructions and can make calculations to more significant places. Note: the 8085 processor does have two 16-bit registers. The pointer and the program counter.


How do you build 8085 using vhdl?

VHDL is a hardware description language. It describes the functionality of a hardware as a program. If we know the architecture of 8085, the same can be implemented or coded using VHDL.


Program to count the number of numbers in an array using 8085 microprocessor?

A program which is used to count the number of numbers in an array using a 8085 microprocessor is known as a assembly language program.


To find LCM of n numbers using 8085 programs?

sample program in sum of the series using the formula for s=n/2[2a+{n-1}d] in 8085


What is Difference between 8155 and 8255 microprocessor?

Neither the 8155 nor the 8255 are considered to be microprocessors. The 8155 is an integrated RAM, IO, and Timer device designed for the 8085. The 8255 is an Programmable IO controller.


What is the evolution of Intel computer?

It starts with the 4004 chipset (4 bit) and 8008 microprocessor (8 bit). The successor of the 4004 was the 4040, but this architecture was a dead end. The successors of the 8008 were the 8080, 8085, 8086, 8088, 80186, 80286, 80386, 80486, Pentium, etc. including the current multicore microprocessors. IBM chose to base their PC on the 8086 and 8088, then as successive newer microprocessors were developed new versions of the IBM PC used those microprocessors. Intel also produced many specialized microprocessors and microcontrollers including some RISC microprocessors (e.g. i860, i960). Current Apple Macintosh computers also use the latest Intel multicore microprocessors.


Why rstn has 6 t state in 8085 microprocessors?

4 T-states as usual and 2 more are required to perform n*8 its result gives the vector address of interrupt service routine(rstn is an software interrupt)