I am using the ARMv8 instruction set with Aarch64 execution state. The problem I am having, is were supposed to translate C code into assembly, and I am stuck on the following:
while (c != '\n' && c != EOF)
c = getchar();
I know the basic setup for the while loop, as well as how to test c != '\n'
but the issue I have is how to write EOF
in assembly.
Can i just type
cmp c_r, EOF
b.eq skipwhile
or is it something else?