; this code gereates maximum factorial of 8 decimal
; since, A is a 16-bit register and can hold max value of ;65535 dec (255h).
;
MOV A,#8d ; value for the factorial (1-8max)
MOV B,A ; B=A
MOV C,#1d ; C=1
here: ; LOOP
SUB B,C ; B-1
MUL AB ; AxB
CMP B,C ;if B=1
JNE here ;jump back
END
this code not work .please help me in thi and this also not work for lager values.(i have to take factorial of numbers 1 to 12)