Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CountMatch proc
- push ebp
- mov ebp, esp
- push esi
- push edi
- mov ecx, [ebp + 12]; length of arrays
- mov esi, [ebp + 20]; address of array1
- mov edi, [ebp + 16]; address of array2
- CHKMATCH :
- mov eax, [esi]
- sub eax, [edi]
- jns ELSEloop ;this line is problem
- neg eax
- cmp eax,5
- ja CONTINUE
- inc count
- jmp CONTINUE
- ELSEloop:
- cmp eax,5
- ja CONTINUE
- inc count
- CONTINUE :
- add esi, 4
- add edi, 4
- loop CHKMATCH
- mov eax, count
- call writeint
- call crlf
- pop edi
- pop esi
- pop ebp
- ret 16
- CountMatch endp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement