Thank you so much! That did help, there is no more errors, however I am having trouble with the count.
After I read the input into Buffer, I want to go char by char at the Buffer address and examine wether it is greater than 0x00
countLength:
mov r12, [Buffer]
cmp r12, 0
jg increaseLength
je done
jmp countLength
increaseLength:
inc qword [inputLength]
done:
ret
But when I was debugging it in the Hopper disassembler, I found out that after this stage
mov r12, [Buffer]
r12 remains empty, and then it simply returns from this function without incrementing.
I examined the memory at Buffer address, and It was filled with 0x00!
But when I was calling display function
showBuffer:
mov rax, 0x2000004
mov rdi, 1
mov rsi, qword Buffer
mov rdx, 63
syscall
ret
it did print the Buffer without any problems.
Where could the problem be here?