I am trying to translate
while ((getchar()) != '\n');
into assembly but am finding it difficult.
CodePudding user response:
You would use something like this:
li s0, 10
again:
call getchar
bne a0, s0,again
I am trying to translate
while ((getchar()) != '\n');
into assembly but am finding it difficult.
CodePudding user response:
You would use something like this:
li s0, 10
again:
call getchar
bne a0, s0,again