mips – How to delimit an entry between 0 and 127 in assembly?

I am learning assembly and I have some problems to implement an input. In my case, I have to allow an int entry between 0 and 127. Otherwise, the program is finished. I tried with the SLT method, but I found myself stuck.

I did the program c to try to understand, but it looks so much easier in C.


int main () {
int num1;
int num2 = 1;
int sum = 0;

printf ("write a number:  n");
scanf ("% d", & num1);

if (num1> = 0 && num1 <= 127) {
sum = num1 + num2;

printf ("incorrect entry");

returns 0;