title: Assembly x86 call after cmp
body: <p>I have the following code to compare numbers and increment a variable if true or false</p>
  
  <pre><code>failcheck1:
              mov eax, val1
              add ebx, 4
              cmp eax, 40
              jl failinc1
  
              mov eax, passes
              inc eax
              mov passes, eax
              jmp failcheck2
  
  failinc1:
              mov eax, fails
              inc eax
              mov fails, eax
  
  
  failcheck2 :
              mov eax, val2
              add ebx, 4
              cmp eax, 40
              jl failinc2
  
              mov eax, passes
              inc eax
              mov passes, eax
              jmp failcheck3
  
  failinc2:
              mov eax, fails
              inc eax
              mov fails, eax
  </code></pre>
  
  <p>I have 8 such checks. I was wondering if I create a single failinc and passinc subroutine with <strong>ret</strong> in it how can I call it after <strong>cmp</strong> ?</p>