View difference between Paste ID: ET1h8BLu and YaVNFUC5
SHOW: | | - or go back to the newest paste.
1
.stack 100h
2
.model small
3
.data             
4
    n dw 3
5
.code
6
7
main proc
8
    
9
    mov ax,@data
10
    mov ds,ax 
11
    
12
    mov cx,n
13
    dec cx
14
    mov ax,n
15
    
16
    fact: 
17
        dec n
18
        mul n 
19
        loop fact      
20-
        
20+
21
	;----if i want to print the result ( less than 10 )---
22
    mov ah,2     
23
    mov dx,ax    
24
    add dx,30h
25
    int 21h  
26
	;-------------
27
   
28
    main endp
29
end main