Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- includelib libcmt.lib
- includelib libvcruntime.lib
- includelib libucrt.lib
- includelib legacy_stdio_definitions.lib
- extern printf_s: proc, scanf_s : proc
- .data
- array dword 5, 2, 3, 4, 7, 8, 1, 12
- arraySize = ($ - array)/4 ; 8
- count dword 0
- .data?
- k dword ?
- .code
- main proc
- enter 32,0
- mov rcx, 0 ; i = 0
- mov rsi, array
- loop1:
- CMP rcx, arraySize
- JAE END_FOR
- mov rax, [rsi + rcx * 4]
- cqo
- mov rbx, 2
- div rbx
- cmp rdx, 0
- jne end_if
- inc count
- end_if:
- inc rcx
- jmp loop1
- end_for:
- leave
- xor rax, rax
- main endp
- end
Add Comment
Please, Sign In to add comment