I’ve just started on MIPS with SPIM simulator. Can someone help me converting this statement ?
if(as>47 && as<58) function();
else continue;
Thanx in advance. 🙂
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
My MIPS is a bit rusty, so apologies in advance if this does not work without minor tweaking, but this should hopefully give you a good idea of what you are trying to do.
(If you do find that this does not work, please let me know so I can edit the post)
Take note that right now, function() is not actually a function. you could however
jal functionand have that block reside somewhere else. Here’s a good reference of the MIPS instruction set.The trick in MIPS is that since you don’t have a greater than instruction, you must use the opposite.
Remember that the opposite of > is NOT <, it is <=.