Let's compile following C sequence for MIPS and run on the emulator: int multiply (int N, int M) ( // map sum and i to $
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Let's compile following C sequence for MIPS and run on the emulator: int multiply (int N, int M) ( // map sum and i to $
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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!