Uncategorized

8051 Code to find factorial of N (AT89C51) | Assembly Code 8051

8051 Assembly Code or 8051 ALP to find the facorial of N.Finding factorial is nothing repetitive multiplication with decrement until 1 is encountered. Here in this Code the number whose factorial is to obtained is stored in the Register R0 and a 11 bit function call(ACALL) is used and the value of R0 is decremented and is compared with ‘1’ for this purpose the CJNE(Compare and jump if not equal) instruction is used.Execution will be stopped when R0=1.

If you are facing problem reading the code.Download this code.
Click on the link below to Download

Factorial of N ASM File

Abhay Kagalkar
Software developer, Blogger, Learner,...