DATA SEGMENT
NO DW 5
DATA ENDS
CODE SEGMENT
FACTO PROC NEAR
ASSUME CS:CODE
MOV AX,0000
POP BX
POP AX
PUSH BX
MOV BL,AL
DEC BL
L1:MUL BL
DEC BL
CMP BL,00
JNE L1
L2:RET
FACTO ENDP
ASSUME DS:DATA,CS:CODE
START:
MOV AX,DATA
MOV DS,AX
PUSH NO
CALL FACTO
MOV BH,00
MOV AH,4CH
INT 21H
CODE ENDS
END START
;------
;OUTPUT
;------
-G CS: 0020
AX=0078 BX=0000 CX=0036 DX=0000 SP=0000 BP=0000 SI=0000 DI=0000
DS=0BA4 ES=0B94 SS=0BA4 CS=0BA5 IP=0020 NV UP EI PL ZR NA PE NC
0BA5:0020 B700 MOV BH,00
-Q