Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .586
- .model flat, stdcall
- option casemap: none
- include \masm32\include\windows.inc
- include \masm32\include\kernel32.inc
- include \masm32\include\masm32.inc
- include \masm32\include\debug.inc
- include \masm32\include\user32.inc
- includelib \masm32\lib\kernel32.lib
- includelib \masm32\lib\masm32.lib
- includelib \masm32\lib\debug.lib
- includelib \masm32\lib\user32.lib
- .data
- Arr dd -5,6,2,22,3,45,-6,234,-55,13
- Var dw 7
- .code
- start:
- mov ecx, 1
- mov bx, 0
- sum:
- xor eax, eax
- mov eax, [Arr+ecx*4-4]
- cmp eax, 0
- jg addnumb
- inc ecx
- cmp ecx,11
- jne sum
- jmp _exits
- addnumb:
- add edx, eax
- inc bx
- cmp bx, Var
- je _exits
- inc ecx
- cmp ecx,11
- jne sum
- jmp _exits
- _exits:
- PrintDec edx
- invoke ExitProcess, NULL
- end start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement