# `bal`

[MIPS Documentation](https://asm-editor.specy.app/documentation/mips.md) › [Instructions](https://asm-editor.specy.app/documentation/mips/instruction.md)

Web page: https://asm-editor.specy.app/documentation/mips/instruction/bal

**Branch and link** · Pseudo-instruction

Category: Control flow

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

## Forms

- `bal label`
  - `bal label` → `bgezal $zero, label`

## Operands

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

## Description

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

## Example

```mips
# 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
```
