.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
I compiled this code on ubuntu
as hello.s -o hello.o
ld hello.o -o hello
when I run the program with the command "./hello" the result showed:Segmentation fault (core dumped)