Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
General conversion from C language to assembly MIPS
if(condition) 
{
	clause1
} 
else {
	clause2
}

Thanks

What I have tried:

condition
clause2
j end
then:
clause1
end:


How should I convert without a specific condition?
Posted
Updated 7-Nov-21 17:23pm

1 solution

I would read this page closely and follow its examples : MIPS Assembly Language Examples[^]
 
Share this answer
 
Comments
ubutu2334 7-Nov-21 23:26pm    
It has no general form "if else"? 😥
Rick York 8-Nov-21 0:01am    
It's just another form of branch. I'm sure you can figure it out.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900