title: How to count number of vowels in a string in 8086 ALP?
body: <p>I wrote an assembly program that does the calculation of number of vowels in a string which is read by the user. Reading of string and calculation of length are working fine. But when comparing the characters of the string, it is not working for the first two characters.This is my code. </p>
  
  <pre><code>.MODEL small
  .STACK
  .DATA
   input db 10,?
   length db ?
   count db ?
  .CODE
  .STARTUP 
   ;reading string
   mov dx,00h
   mov dx,offset input
   mov ah,0Ah
   int 21h 
  
   ;calculating length
   mov length,00h
   mov si,offset input+2
  
   ;checking for vowels
   loopi: cmp [si],'$'
      je next
      add length,01h
      inc si
      loop loopi
   next:
      mov cx,00h
      mov cl,length 
  
      mov si,offset input+2 
      mov count,00h
   counting:cmp [si],'a'
        je count1 
        cmp [si],'e'
        je count1
        cmp [si],'i'
        je count1
        cmp [si],'o'
        je count1
        cmp [si],'u'
        je count1
        inc si
        loop counting
        cmp cl,00h
        je exit
    count1:inc count 
        inc si
       loop counting 
   exit: 
  .EXIT
   end
  </code></pre>
  
  <p>This code is not comparing/checking the first two characters of the string. Can someone help me with this as soon as possible?
  Any help would be very appreciated. Thank you so much.</p>