I'm having trouble with changing the value in %rax, which is 1 into a char* for it to be printed in a syscall write in x86 64 Assembly GAS. It produces a segmentation fault. No stdlib.
# Write Implementation
mov %rax,rsi #Number to print
mov $1, %rax #Write
mov $1, %rdi #File Handle 1
mov $4, %rdx
syscall