Advertisement
shawonrog

uPPER TO LOWER & lOWER TO UPPER

Oct 9th, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. .MODEL SMALL
  2. .STACK 100H
  3. .DATA
  4.  
  5. MSG1 DW "INPUT: $"
  6. MSG2 DW "OUTPUT IS: $"
  7.  
  8. .CODE
  9. MAIN PROC
  10.  
  11. MOV AX,@DATA
  12. MOV DS,AX
  13.  
  14. MOV AH,9
  15. LEA DX,MSG1
  16. INT 21H
  17.  
  18. MOV AH,1
  19. INT 21H
  20. MOV BL,AL
  21.  
  22. MOV AH,2
  23. MOV DL,0AH
  24. INT 21H
  25. MOV DL,0DH
  26. INT 21H
  27.  
  28. CMP BL,'a'
  29. JGE CAPITAL
  30.  
  31. CMP BL,'A'
  32. JG SMALL
  33.  
  34. SMALL:
  35. CMP BL,'Z'
  36. JLE C
  37. C:
  38. MOV AH,9
  39. LEA DX,MSG2
  40. INT 21H
  41. ADD BL,32
  42. MOV AH,2
  43. MOV DL,BL
  44. INT 21H
  45. JMP END_IF
  46.  
  47. CAPITAL:
  48. CMP BL,'z'
  49. JL S
  50. S:
  51. MOV AH,9
  52. LEA DX,MSG2
  53. INT 21H
  54. SUB BL,32
  55. MOV AH,2
  56. MOV DL,BL
  57. INT 21H
  58. JMP END_IF
  59.  
  60. END_IF:
  61. MAIN ENDP
  62. END MAIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement