title: Asm Assembler - CX loop never executes
body: <p>I have a vector and I have to put in the <code>AX</code> register the sum of the numbers that are greater than 50 ( > 50 ).</p>
  
  <p>I do not understand why my loop does not work when I run it. First it compares 100 with 50, jumps at <em>adunare</em> , add 100 to <code>AX</code> but then it exits the loop and terminates the program.</p>
  
  <pre><code>.MODEL SMALL
  .STACK 10h
  .DATA
  vect DB 100,70,3,10,60,200,30
  len DB 7
  .CODE
  
  begin:
      mov ax,@DATA
      mov ds,ax
      mov ax,0
      mov cl,len
      mov ch,0
      mov si, -1
  
  bucla:
      inc si
      cmp vect[si],50
      ja adunare
      jb mic
  
  adunare:
      add ax, word ptr vect[si]
  
  mic:
      loop bucla
      mov ah,4ch
      int 21h
  
  END begin
  </code></pre>