- Let S Compile Following C Sequence For Mips And Run On The Emulator Int Multiply Int N Int M Map Sum And I To 1 (49.7 KiB) Viewed 31 times
Let's compile following C sequence for MIPS and run on the emulator: int multiply (int N, int M) ( // map sum and i to $
-
- Site Admin
- Posts: 899603
- 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.