Question: Convent the c++ code into IMPS assembly. Base MIPS code and C++ code is on the photo. Base MIPS Code C++ Equivalent dinclude S51 .

Convent the c++ code into IMPS assembly.
Base MIPS code and C++ code is on the photo.
 Convent the c++ code into IMPS assembly. Base MIPS code and

Base MIPS Code C++ Equivalent dinclude S51 . So the even placed digits are 3 and 1 and the odd place digi' r4 and 2 from the left sumOfDoubleEvenPlace: s int sumOfDoubleEven Place (int number) s main 7 li $s0 , 8974 4563 # int test 1 89744563; sli Ss1, 98756421 int test2-98756421 nt sum0 int digit li Ss2, 0 li Ss3, 0 #int resulti 0: # int result2 0; I/Remove first odd digit mber namber 10 while (nuber0) code for first function call add Sa0, $0, $s0 add Ss2, $0, Sv0 addi SvO, s0, 4 //Grab even placed digit digit-(number % 10); // Double the digit and pass it to getDigit /Add result to s sumget Digit (digit 2) //Remove eurrent even digit and the next odd digit umber-number/100 s jal sumOfDoubleEvenPlace 1a Sa0, expVal2:3 syscall return su move Sa0, Ss2 ssnumber addi Svo, S0, 1 For example ssyseall s1 would return 11 would return 2 17 la Sa0 endl 18 would return int get Digit (int nuber) if (number

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!