Skip to content

MODU

Operation

Writes the unsigned remainder of destination-by-source division.

Assembler Syntax

MODU.{B|W|L|Q}(z) <ea>(e), Rn(d)

MODU.{B|W|L|Q}(z) Rn(s), Rn(d)

Privilege

Unprivileged

Repeat eligibility

REP eligible; REPcc observes dst

Writes the remainder of selected-width unsigned destination-by-source division. A zero divisor raises DIVIDE_BY_ZERO.

Let \(n\) be the selected operand width, \(d\) the unsigned dividend, and \(s\) the unsigned divisor. The quotient and remainder are defined by $\(q = \lfloor d/s \rfloor, \qquad r = d - qs .\)$ For a nonzero divisor, the remainder satisfies \(0 \le r < s\). The destination supplies the dividend and receives \(r\).

A zero divisor raises DIVIDE_BY_ZERO; no destination is changed.

2.75in

Encodings

MODU.{B|W|L|Q}(z) <ea>(e), Rn(d)

Format: Instruction format for MODU.{B|W|L|Q}(z) <ea>(e), Rn(d)

Format: Instruction format for MODU.{B|W|L|Q}(z) <ea>(e), Rn(d)

2.75in MODU.{B|W|L|Q}(z) Rn(s), Rn(d)

Format: Instruction format for MODU.{B|W|L|Q}(z) Rn(s), Rn(d)

Format: Instruction format for MODU.{B|W|L|Q}(z) Rn(s), Rn(d)