Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. CountMatch proc
  2. push ebp
  3. mov ebp, esp
  4. push esi
  5. push edi
  6. mov ecx, [ebp + 12]; length of arrays
  7. mov esi, [ebp + 20]; address of array1
  8. mov edi, [ebp + 16]; address of array2
  9.  
  10. CHKMATCH :
  11. mov eax, [esi]
  12. sub eax, [edi]
  13. jns ELSEloop ;this line is problem
  14. neg eax
  15. cmp eax,5
  16. ja CONTINUE
  17. inc count
  18. jmp CONTINUE
  19. ELSEloop:
  20. cmp eax,5
  21. ja CONTINUE
  22. inc count
  23.  
  24. CONTINUE :
  25. add esi, 4
  26. add edi, 4
  27. loop CHKMATCH
  28.  
  29. mov eax, count
  30. call writeint
  31. call crlf
  32. pop edi
  33. pop esi
  34. pop ebp
  35. ret 16
  36. CountMatch endp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement