Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .386
- .model flat, c
- public p01
- .code
- p01 proc
- push ebp
- mov ebp, esp
- push edi
- push esi
- push ebx
- mov ecx, [ebp + 12] ; ecx - matrix len
- mov ebx, [ebp + 8] ; ebx - matrix adress
- mov eax, 0 ; nill
- mov edx, ecx ; edx - matrix len2
- add ebx, edx ; offset to [1] string [0] index
- dec ecx ; ecx = 4
- M1:
- mov edi, 0
- mov esi, ecx ; esi = 4;
- mov ecx, edx ; ecx = 5;
- sub ecx, esi ; how many fields in string i need to check
- M2:
- test byte ptr [ebx + edi], 1 ; if even => flag zf = 1;
- jz SKIP_INC ; if zf == 1;
- inc eax
- SKIP_INC:
- inc edi
- loop M2
- mov ecx, esi ; ecx = 4 for loop m1
- add ebx, edx ; to new string
- loop M1
- mov edi, [ebp + 16]
- mov dword ptr [edi], eax
- pop ebx
- pop esi
- pop esi
- pop ebp
- ret
- p01 endp
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement