Question: Implement the below code in MIPS main(){ g=10;h=10;a=5; if(a==0) { b=update(g,h); print b; } else { c=update(g,h); print c; }} update(g,h){ g= incr(g,1); h= incr(h,2);
Implement the below code in MIPS
- main(){
g=10;h=10;a=5;
if(a==0) {
b=update(g,h);
print b;
}
else {
c=update(g,h);
print c;
}}
update(g,h){
g= incr(g,1);
h= incr(h,2);
return ((g + h)}
incr(n,i)
{
return(n+i);
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
