This is my source code for linux x86_64:
it's very very simple but i got this error (Segmentation fault (core dumped))
i also change the 'main' with only 'ret' and i got this error again !!!! i don't think it's about 'main' code ...
FORMAT ELF64 EXECUTABLE
SEGMENT READABLE EXECUTABLE
ENTRY main
main:
mov rax, 3 ; SYS_CLOSE
mov rdi, 0
syscall
i'm using './fasm.x64 prog.asm' command to compile this file and my OS => 'Fedora 31 x86_64'