Saturday, 15 October 2011

To find factorial of a number.

To find factorial of a number we can use the same procedure as in C++ programming.


CODE:



MVI B,05
MOV C, B
DCR C
LABEL2: MOV E, C
SUB A
LABEL1: ADD B
DCR E
JNZ LABEL1
MOV B, A
DCR C
JNZ LABEL2
STA 00H
HLT




Screen Shot:



3 comments:

  1. nice simulator . can you please give me the link to download this simulator ?

    ReplyDelete
    Replies
    1. above program was simulated in ubuntu linux 8085 simulator
      and it is available for free in ubuntu software center
      u can install ubuntu and download this simulator to run it on linux platform. its easy to use and very helpful for beginner

      Delete
  2. above program was simulated in ubuntu linux 8085 simulator
    and it is available for free in ubuntu software center
    u can install ubuntu and download this simulator to run it on linux platform. its easy to use and very helpful for beginner

    ReplyDelete