Let's compile following C sequence for MIPS and run on the emulator: int multiply (int N, int M) ( // map sum and i to $
Posted: Mon Jun 06, 2022 5:34 pm
Let's compile following C sequence for MIPS and run on the emulator: int multiply (int N, int M) ( // map sum and i to $s0 and $s1 int sum= 0; for (int i O 0; i < N; ++i) ( sum += M; } return sum; } int main() // map a, b, and k to $80, $s1 and $s2 int a = 4; int b = 5; int k = multiply (a, b); Make sure multiply procedure properly gets backup of $50 and $$1. Verify that after running this sequence, value of 52 is (20)10 (0x0014) hex When ready, copy your MIPS assembly code from emulator and save as a text file. Submit this file on Moodle.