Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- section .data
- hello db 'Hello, World!', 0
- section .text
- global _start
- _start:
- ; Prints "Hello, World!" to the console
- mov rax, 1 ; syscall number for sys_write
- mov rdi, 1 ; file descriptor 1 is stdout
- mov rsi, hello ; address of hello
- mov rdx, 13 ; number of bytes
- syscall ; invoke syscall
- mov rax, 60 ; syscall number for sys_exit
- xor rdi, rdi ; exit code 0
- syscall ; invoke syscall
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement