ASM program to find the factorial of the given number

Aim: – To write an assembly language program to find the factorial of the given number.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
MOV CL, X
DEC CL 
MOV BX, 00
INC BX
MOV A[BX], 01
MOV AL, 00
MOV DL, 01
L1:		INC BX 
ADD AL, DL
MOV A[BX], AL
MOV AL, DL
MOV DL, A[BX]	
LOOP L1
END

Result: Fibonacci series of a given number is obtained.


Leave a Reply