EXPT-4
EXPT-4
EXPT-4
LABDEPARTMENT
EXP.No: 04 Date:
FACTORIAL OF A NUMBER
2.PC
ALGORITHM:
PROGRAM:
DATA SEGMENT
NUM DB 05H
RESULT DB(?)
DATA ENDS
CODE SEGMENT
MOV DS,AX
MOV AX,0001
MOV BX,NUM
REPEAT: MUL BX
DEC BX
JNZ REPEAT
MOV [RESULT], AL
INT 21H
CODE ENDS
END START
CODE TABLE:
PROCEDURE:
7. Type eds: offset address of input/output variables for obtain the result.
OBSERVATIONS:
INPUT: 05H
OUTPUT: 78H(120)