bal

Branch and link Pseudo-instruction

Branches unconditionally to label and saves the return address in $ra.

Forms

Operands

label
A named address in the program, such as the start of a loop or a variable in .data.

The counterpart of 'b' for calling a subroutine whose address is a label

# bal transfers control to the nearby label. Inspect $t2: it is 2 after the target runs.
li $t2, 0
bal taken
li $t2, 1
taken: li $t2, 2