Advertisement
Farid_Mia59

lab-03

Nov 25th, 2019
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. .model small
  2. .stack 100h
  3. .data
  4. input db 'We are DUET Students',10,13,'$'
  5.  
  6. .code
  7.  
  8. main proc
  9. mov ax,@data;
  10. mov ds,ax;
  11. mov ah,09
  12. mov dx,offset input
  13. int 21h
  14. mov di,offset input
  15.  
  16. check_first_upper_case:
  17.  
  18.  
  19. cmp [di],'$'
  20. je last
  21. cmp [di],90
  22. jle First_upper_case
  23. inc di
  24. jmp check_first_upper_case
  25.  
  26. again:
  27.  
  28.  
  29. cmp [di],'$'
  30. je last
  31.  
  32. cmp [di],90
  33. jle Last_upper_case
  34. inc di
  35. jmp again
  36.  
  37.  
  38.  
  39. First_upper_case:
  40. mov ah,02
  41. mov dl,[di]
  42. int 21h
  43. inc di
  44. jmp again;
  45.  
  46.  
  47. Last_upper_case:
  48.  
  49. cmp [di],65
  50. jge print
  51. inc di
  52.  
  53. jmp again
  54.  
  55.  
  56. print:
  57. mov bl,[di]
  58. inc di
  59. jmp again
  60.  
  61. last:
  62.  
  63. mov ah,02
  64. mov dl,10
  65. int 21h
  66. mov dl,13
  67. int 21h
  68. mov dl,bl
  69. int 21h
  70. mov ah,4ch
  71. int 21h
  72.  
  73. main endp
  74. end main
  75. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement