i need to read some unknown number of chars from file. I want to detected the end of string (in this case it is EOF). Firstly i read from file using syscall 3, and then checked if rax is equal to 0. Thats works well if I read one char at the same time,but I want to read like this:
mov rax, 3
mov rbx, stdin
mov rcx, input
mov rdx, 8
int 80h
So i read 8 bits, and then i got loop over this bits i want to detect if there is eof. EOF detection looks like this::
cmp r8b,0
jle loop_end
But that doenst work at all. Can i somehow read more bits fe. 8. And detected EOF on fe position 5? Or maybe syscall 3 can return number of bits readed?