3 ms·
$ cat >hello.s <<EOF .text .globl main main: leaq msg, %rdi callq puts ret .data msg: .asciz "hello world\n" EOF $ as -o hello.o hell
by dododo 16y ago
$ cat >hello.s <<EOF
.text
.globl main
main:
leaq msg, %rdi
callq puts
ret
.data
msg: .asciz "hello world\n"
EOF
$ as -o hello.o hello.s; cc -o hello hello.o; ./hello
hello world