Advertisement
shawonrog

Right order ASM

Oct 9th, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. .STACK 100H
  2. .MODEL SMALL
  3. .DATA
  4. A DW " ENTER 3 CHARACTER: $"
  5. B DW " OUTPUT IS: $"
  6. C DW " INPUT IS WRONG !!!!$"
  7. .CODE
  8. MAIN PROC
  9. MOV AX,@DATA
  10. MOV DS,AX
  11.  
  12. LEA DX,A
  13. MOV AH,9
  14. INT 21H
  15.  
  16. MOV AH,1
  17. INT 21H
  18. MOV BL,AL
  19.  
  20. MOV AH,1
  21. INT 21H
  22. MOV CL,AL
  23.  
  24. MOV AH,1
  25. INT 21H
  26. MOV BH,AL
  27.  
  28. MOV AH,2
  29. MOV DL,0DH
  30. INT 21H
  31. MOV DL,0AH
  32. INT 21H
  33.  
  34. ADD BL,1
  35. ADD CL,1
  36. ADD BH,1
  37.  
  38. LEA DX,B
  39. MOV AH,9
  40. INT 21H
  41.  
  42. MOV AH,2
  43. MOV DL,BL
  44. INT 21H
  45.  
  46. MOV AH,2
  47. MOV DL,CL
  48. INT 21H
  49.  
  50. MOV AH,2
  51. MOV DL,BH
  52. INT 21H
  53.  
  54. MAIN ENDP
  55. END MAIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement