Take the zero branch
Branch around the wrong value and leave 9 in t1.
The supplied value is zero. Add a conditional branch to the success label so the destination register finishes with 9.
Learning goals
- Compare a register with zero
- Branch to a label
- Preserve the successful path
Tests
- Program exits cleanly
- t1 contains 9
- Solution uses BEQ
- 1 hidden grading test