Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- _asm{
- sub esp, 4
- mov [esp], '%'
- mov [esp + 1], 'd'
- mov [esp + 2], '\t'
- mov [esp + 3], '\0'
- mov ebx, 1000
- mov ecx, 1
- jmp start_while1
- incrementare1:
- add ecx, 1
- start_while1:
- cmp ecx, ebx
- jge end_while1
- mov edi, 2
- mov esi, 0
- jmp start_while2
- incrementare2:
- add edi, 1
- start_while2:
- cmp edi, ecx
- jge end_while2
- mov eax, ecx
- xor edx, edx
- div edi
- test edx, edx
- jnz incrementare2
- mov esi, 1
- end_while2:
- test esi, esi
- jnz incrementare1
- push ecx
- lea ecx, [esp+4]
- push ecx
- call printf
- pop ecx
- pop ecx
- jmp incrementare1
- end_while1:
- add esp, 4
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment