Advertisement
naeem043

Assignment 3

Mar 5th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. .MODEL SMALL
  2. .STACK 100H
  3.  
  4. MAIN PROC
  5. INCLUDE 'EMU8086.INC'
  6.  
  7. MOV CL, '0'
  8. MOV BL, '2'
  9. MOV BH, 2
  10.  
  11. PRINT 'Input your number : '
  12. MOV AH,1
  13. INT 21H
  14.  
  15.  
  16. L1:
  17. CMP CL, '3'
  18. JE SERISE
  19. CMP BL, AL
  20. JE EXIT
  21.  
  22.  
  23. INC BL
  24. INC CL
  25.  
  26. JMP L1
  27.  
  28. SERISE:
  29.  
  30. ADD BH, BL
  31. MOV CL, '0'
  32. JMP L1
  33.  
  34.  
  35. EXIT:
  36. PRINTN ''
  37. PRINTN ''
  38. PRINT 'The serise summation is : '
  39. MOV AH, 2
  40. MOV DL, BH
  41. INT 21H
  42.  
  43.  
  44. END MAIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement