jal and jr.
jal label # jump and link
$31 (or $ra).
jr rs # jump register
rs.
Thus, if a jr $31”jal, control will return to the instruction following the jal.
| Arithmetic Series Calculation (1+2+3+...+n) | |
|---|---|
| Without Using a Subroutine | Using a Subroutine |