Problem I ( Assembler ) Provide the assembly implementation of the C - code below . Sub 10 is a function that subtract 10 from a given input x. Assumption : MyArray base address is store in register...


Problem I ( Assembler )


Provide the assembly implementation of the C - code below . Sub 10 is a function that subtract 10 from a given input x.




Assumption :


MyArray base address is store in register $S1.



Feel free to use instruction li or si.


li load an immediate value into a register . For instance, li $S4 5 will copy value 5 into register $S4.




C code


for ( i = 0,1 < 10="" ,="" i="" ++="">


{


MyArray [ i ] = MyArray [ i - 1 ] + MyArray [ i + 1 ] ;


Sub10 ( MyArray [ i ];


}


Sub10 ( x )


{


Return ( x - 10 ) ;


}



Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here