div

Operands

$reg, $reg, [$reg / imm]

Variants

  • Divide signed : Divides $t1 by $t2 (signed). Sets LO to the quotient and HI to the remainder. Division by zero produces undefined results with no exception. Use 'mflo' to get the quotient; 'mfhi' to get the remainder. div $t1,$t2
  • DIVision : Set $t1 to ($t2 divided by $t3, integer division) div $t1,$t2,$t3
  • DIVision : Set $t1 to ($t2 divided by 16-bit immediate, integer division) div $t1,$t2,-100
  • DIVision : Set $t1 to ($t2 divided by 32-bit immediate, integer division) div $t1,$t2,100000

Divide signed : Divides $t1 by $t2 (signed). Sets LO to the quotient and HI to the remainder. Division by zero produces undefined results with no exception. Use 'mflo' to get the quotient; 'mfhi' to get the remainder.

Loading...