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

3 thoughts on “8051 Code to find factorial of N (AT89C51) | Assembly Code 8051

  • April 4, 2017 at 2:25 pm
    Permalink

    THANK YOU FOR AN AMAZING CODE…IT WOULD BE HELPFUL IF YOU COULD EXTEND THIS FOR FINDING FACTORIAL OF NUMBERS GREATER THAN 05

    Reply
  • April 7, 2017 at 2:49 pm
    Permalink

    Thank you so much…but i would be greatful to you if i could get the code as soon as possible….

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Advertisment ad adsense adlogger