Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- printInt: // to use it push int on stack and call
- push ebx
- push ecx
- push edx
- // get argument
- mov ebx, eax
- mov eax, [esp + 16]
- push eax
- // get format
- mov eax, offset intFormat
- push eax
- call printf
- add esp, 8
- mov eax, ebx
- pop edx
- pop ecx
- pop ebx
- ret
- intFormat: .string "%d\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement