Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- section .data
- text db "Hello, world!", 10, 0
- section .text
- global main
- main:
- push ebp
- mov ebp, esp
- sub esp, 8
- mov dword[esp], text
- mov dword[esp + 4], 0xe
- call print_string
- xor eax, eax
- leave
- ret
- print_string:
- push ebp
- mov ebp, esp
- mov eax, 0x4
- mov ebx, 0x1
- mov ecx, [ebp + 8]
- mov edx, [ebp + 12]
- push .ret
- push ecx
- push edx
- push ebp
- mov ebp, esp
- sysenter
- .ret:
- leave
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement