# `msub`

[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/msub

**Multiply-subtract signed**

Category: Arithmetic

Multiplies the two registers (signed) to form a 64-bit product, then subtracts that product from the current 64-bit value in HI:LO.

## Forms

- `msub $t1, $t2`

## Operands

- `$t1`: Any general-purpose register, `$0` to `$31`, using its numeric or named spelling, such as `$8` or `$t0` (`$zero` is `$0`; `$ra` is `$31`).
- `$t2`: A general-purpose register. It may be the same register as `$t1`.

## Description

Use 'mfhi'/'mflo' to read the result.

## Example

```mips
# Start accumulator at 100, then subtract 6 times 7. Inspect LO: 58.
li $t0, 100
mtlo $t0
mthi $zero
li $t0, 6
li $t1, 7
msub $t0, $t1
mflo $t2
```
