GAS x64 GNU Assembler create function (call, ret) tutorial in Linux
.global _start
.data
hello:.string "hello\n"
.text
_start:
call output
call exit
output:
mov $1,%rax
mov $1,%rdi
mov $hello,%rsi
mov $10,%rdx
syscall
ret
exit:
mov $60,%rax
mov $0,%rdi
syscall