Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %include "io.inc"
- section .text
- CNT_1:
- push ebp
- mov ebp, esp
- mov eax, dword[ebp + 8]
- cmp eax, 0
- je .end
- mov ecx, 3
- xor edx, edx
- div ecx
- cmp edx, 2
- mov ecx, 0
- cmove edx, ecx
- push edx
- push eax
- call CNT_1
- add eax, dword[ebp - 4]
- .end:
- mov esp, ebp
- pop ebp
- ret
- global CMAIN
- CMAIN:
- push ebp
- mov ebp, esp
- GET_UDEC 4, eax
- sub esp, 4
- mov dword[ebp - 4], eax
- call CNT_1
- PRINT_UDEC 4, eax
- mov esp, ebp
- pop ebp
- xor eax, eax
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement