Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. include 'emu8086.inc'
  2. org 100h
  3.  
  4. print 'Enter first number: ', 0
  5. call scan_num
  6. mov n1, cx
  7.  
  8. gotoxy 0,1
  9. print 'Enter second number: ', 0
  10. call scan_num
  11. mov n2, cx
  12.  
  13. mov ax, n1
  14. add ax, n2
  15.  
  16.  
  17. gotoxy 0,2
  18. print 'Sum: ', 0
  19. call print_num
  20.  
  21. mov ax, n1
  22. sub ax, n2
  23.  
  24. gotoxy 0,3
  25. print 'Difference: ', 0
  26. call print_num
  27.  
  28. mov ax, n1
  29. mul n2
  30.  
  31. gotoxy 0,4
  32. print 'Product: ', 0
  33. call print_num
  34.  
  35. mov ax, n1
  36. div n2
  37.  
  38. gotoxy 0,5
  39. print 'Quotient: ', 0
  40. call print_num
  41.  
  42. mov dx, ax
  43.  
  44. gotoxy 0,6
  45. print 'Remainder: ', 0
  46. call print_num
  47.  
  48.  
  49.  
  50. int 20h
  51.  
  52. ret
  53.  
  54. n1 dw ?
  55. n2 dw ?
  56. define_print_num
  57. define_print_num_uns
  58. define_scan_num
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement