.386
.model flat, stdcall
includelib kernel32.lib
ExitProcess PROTO ,:DWORD
.data
arr dd 4,5,-13,3
N=4
res db N dup (?)
.code
Winmain PROC
lea ebx, arr
xor eax, eax
mov edi, 0
mov ecx, N
cycle:
mov eax, [ebx]
push ecx
mov ecx, 16
xor cl, cl
mov cl, 16
cycle1:
push eax
dec cl
sar eax, cl
and eax, 1
test eax, 1
je x
inc edi
x:
pop eax
loop cycle1
pop ecx
lea eax, res
mov [eax], edi
add ebx, 2
loop cycle
push 0
call ExitProcess
Winmain endp
end Winmain