求助高手解释一下程序,不胜感激
求高手解释一下每一步,详细点,我是菜鸟。。。下面是相关部分(就是红色部分不懂,不知道怎么通过递归实现阶乘的),请大侠分析一下具体实现过程,先拜谢了!
STACK SEGEMENT PARA STRCK 'STACK'
DW 64 DUP (?)
STACK ENDS
DATA SEGEMENT
N DB 8
FUNCN DW ?
DATA ENDS
CODE SEGEMENT
ASSUME CS:CODE,SS:STACK,DS:DATA
MAIN PROC FAR
START: PUSH DS
MOV AX,0
PUSH AX
MOV AX ,DATA
MOV DS,AX
PUSH CX
MOV AH,0
MOV AL,N
CALL FACTOR
MOV FUNCN,AX
POP CX
RET
MAIN ENDP
FACTOR PROC NEAR
PUSH AX
SUB AX,1
JNE AGAIN
POP AX
JMP FIN
AGAIN: CALL FACTOR
POP CX
MUL CL
FIN: RET
FACTOR ENDP
CODE ENDS
END START