DIV

DIV (Division) operator:

Name of the instruction

The "DIV" (Division) operator is used in programming languages to divide a register by another or to divide a specified destination by an immediate value.

Definition of the instruction

Syntax

DIV RX, Y

Where :

  • RX: Represents the destination register where the quotien of RX and Y will be moved. It's the dividend

  • Y: Represents the source register or immediate value that will be the divisor to the destination register.

Usage

  • Division of Register Values:

    DIV R1, R2
    • Detail: This example illustrates the multiplication of the values stored in registers R1 and R2. The product is stored in register R1.

  • Division with Immediate Value:

    DIV R3, #8
    • Detail: Here, the contents of register R3 are multiplied by the immediate value 8. The result is stored back in register R3.

Last updated