I am using the yasm assembler on wsl2.
segment .text
global _start
_start:
mov eax,1
I am compiling it in the following way
yasm -f elf64 -g dwarf2 -l task1.lst task1.asm
ld -o task1 task1.o
I am using the yasm assembler on wsl2.
segment .text
global _start
_start:
mov eax,1
I am compiling it in the following way
yasm -f elf64 -g dwarf2 -l task1.lst task1.asm
ld -o task1 task1.o
So it appears that an exit code similar to C is required. so too fix this code just add
mov rax, 60
mov rdi, 0
syscall