Advertisement
shawonrog

ADDING

Oct 23rd, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. .STACK 100H
  2. .MODEL SMALL
  3. .DATA
  4. MSG1 DB 'ENTER FIRST NUMBER: $'
  5. MSG2 DB 'ENTER SECOND NUMBER: $'
  6. MSG3 DB 'ADDITION RESULT IS: $'
  7. .CODE
  8. MAIN PROC
  9. MOV AX,@DATA
  10. MOV DS,AX
  11.  
  12. LEA DX,MSG1
  13. MOV AH,9
  14. INT 21H
  15.  
  16. MOV AH,1
  17. INT 21H
  18.  
  19. MOV BL,AL
  20.  
  21. MOV AH,2
  22. MOV DL,0DH
  23. INT 21H
  24. MOV DL,0AH
  25. INT 21H
  26.  
  27. LEA DX,MSG2
  28. MOV AH,9
  29. INT 21H
  30.  
  31. MOV AH,1
  32. INT 21H
  33.  
  34. MOV CL,AL
  35.  
  36. MOV AH,2
  37. MOV DL,0DH
  38. INT 21H
  39. MOV DL,0AH
  40. INT 21H
  41.  
  42. LEA DX,MSG3
  43. MOV AH,9
  44. INT 21H
  45.  
  46. SUB BL,30H
  47. SUB CL,30H
  48.  
  49. ADD CL,BL
  50. ADD CL,30H
  51.  
  52. MOV DL,CL
  53. MOV AH,2
  54. INT 21H
  55.  
  56. MOV AH,4CH
  57. INT 21H
  58.  
  59. MAIN ENDP
  60. END MAIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement