Call a multiply function
Return 6 × 7 through a0 and print 42.
Complete multiply without changing main's call site. Follow the RV32 ABI: arguments and the return value use a0/a1 and ret returns through ra.
Learning goals
- Call with JAL
- Return through RA
- Use the RV32M multiply instruction
Tests
- Program exits cleanly
- t0 preserves the returned 42
- Terminal prints 42
- Solution calls with JAL
- Solution uses MUL
- 1 hidden grading test