Advertisement
udaykumar1997

Untitled

Mar 30th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. .model small
  2. .data
  3. n dw 0009
  4. r dw 0003
  5. res dw ?
  6. .code
  7. mov ax,@data
  8. mov ds,ax
  9.  
  10. mov ax,0001
  11. mov cx,r
  12. mov bx,r
  13. call ncr
  14.  
  15. push ax
  16. mov ax,0001
  17. mov cx,r
  18. mov bx,n
  19. call ncr
  20.  
  21. pop bx
  22. div bx
  23. mov res,ax
  24.  
  25. jmp kill
  26. ncr proc
  27. cmp cx,0000
  28. jle ll
  29. dec cx
  30. mul bx
  31. dec bx
  32. call ncr
  33. ll:ret
  34. ncr endp
  35. kill:mov ah,4ch
  36. int 21h
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement