Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .text
- .global main
- .func main
- main:
- mov $len, %edx # message length
- lea msg(%rip), %rsi # message to write (RIP relative addressing)
- mov $1, %edi # file descriptor (stdout)
- mov %edi, %eax # system call number (sys_write)
- syscall
- ret
- .data
- msg: .ascii "Hello, world!\n"
- len = . - msg # length of the msg string
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement