kabbo512

Untitled

Nov 4th, 2019
82
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .MODEL SMALL
  2. .STACK 100H
  3. .DATA
  4. PROMPT DB 'Enter Text',0dh,0ah,'$'
  5. NOCAP_MSG DB 0DH,0AH,'NO capitals $'
  6.  
  7. CAP_MSG DB 0DH,0AH,' First capital = '
  8.  
  9. FIRST DB ']'
  10. DB ' Last capital = '
  11. LAST db '@ $'
  12. .CODE
  13. MAIN PROC
  14.  
  15. MOV AX,@DATA
  16. MOV DS,AX
  17.  
  18. MOV AH,9
  19. LEA DX,PROMPT
  20. INT 21H
  21.  
  22. MOV AH,1
  23. INT 21H
  24.  
  25. CMP AL,0DH
  26. JE END_WHILE
  27.  
  28. CMP AL,'A'
  29. JNGE END_IF
  30.  
  31. CMP AL,'Z'
  32. JNLE END_IF
  33.  
  34. CMP AL,FIRST
  35. JNL CHECK_LAST
  36. MOV FIRST,AL
  37.  
  38. CHECK_LAST:
  39.  
  40. CMP AL,LAST
  41. JNG END_IF
  42.  
  43. MOV LAST,AL
  44.  
  45. END IF:
  46. INT 21H
  47. JMP WHILE
  48.  
  49. END_WHILE:
  50. MOV AH,9
  51. CMP FIRST,']'
  52. JNE CAPS
  53.  
  54. LEA DX,NOCAP_MSG
  55. JMP DISPLAY
  56.  
  57. CAPS:
  58.  
  59. LEA DX,CAP_MSG
  60. DISPLAY:
  61. INT 21H
  62.  
  63. MOV AH,4CH
  64. INT 21H
  65. MAIN ENDP
  66. END MAIN
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×