.data
msg:.string "hello,world!\n"
len=.-msg
.text
.global _start
_start:
movl $len,%edx
movl $msg,%ecx
movl $1,%ebx
movl $4,%eax
int $0x80
movl $0,%ebx
movl $1,%eax
int $0x80
as -o hello.o hello.s
as may only compile source file but not linked!
ld -s -o hello hello.o
./hello
hello,world!