I've never tought it will be the time to ask my first question here, but here I am.
I have to learn assembly as part of my University studies, and searching the internet didn't bring me an answer to my problem. The problem is that I get segmentation fault core dumped when I try even this simple code:
.text
hello_str:
.asciz "Hello, world!\n"
.global main
main:
movq %rsp, %rbp
movq $0, %rax
movq hello_str, %rdi
call printf
I use gcc -no-pie -o hello.o hello.s and then ./hello.o Commenting call printf makes it run, but without output(obviously). The question is what am I doing wrong? My pc is working on 64 bits has the Windows 10 OS but I use the Windows Subsystem for Linux to compile the program.