ChallengesMIPS
Local progress
All challengesBeginner10 min0 submissions
MIPS challenge

Add two values

Add 5 and 7 and leave 12 in $t2.

Use MIPS registers and an ADD instruction to combine the two supplied values before exiting.

Learning goals

  • Load immediate values
  • Use a three-register ADD
  • Inspect the destination register

Tests

  • Program exits cleanly
  • $t2 contains 12
  • Solution uses ADD
  • 1 hidden grading test

Hints

mips-add-two-values.asmMIPS source
Run the visible tests or submit when you are ready.