title: Assembly counter code won't work or loop forever
body: <p>So, my goal is to make the loop go through x runs and prints msgTrue until the counter is equal to zero. In theory, that should work. I might just have messed up the registers though.</p>
  
  <pre><code>comparesCounter:
  
      cmp ah, 0     ;ah stores the amount of repetitions I want the code to go through
      jne notNull   ;jump if not true  
      jmp exit
  
  notNull:      
      dec ah             ;ah -- 
      mov eax, 4         ;|
      mov ebx, 1         ;|
      mov ecx, msgTrue   ;|&gt;this code prints out what's stored in msgTrue
      mov edx, len1      ;|
      int 80h            ;|
  
      jmp comparesCounter ;jumps up into counter
  </code></pre>
  
  <p>Should I use other Registers maybe or is the mere concept of my code on level of stupidity beyond help?</p>