ASM2 - Documentation
  • 📚ASM2 - Documentation
  • Registers
  • Address Registers
  • Instructions
    • DISP
    • END
    • MOV
    • RET
  • Operators
    • ADD
    • SUB
    • MUL
    • DIV
  • Functions
  • Subroutines
  • Jump
    • Conditional Jump
      • Jump Equal (JE)
      • Jump Not Equal (JNE)
      • Jump Greater (JG)
      • Jump Greater or Equal (JGE)
      • Jump Less (JL)
      • Jump Less or Equal (JLE)
    • Unconditional Jump
Powered by GitBook
On this page
  • Name of the instruction
  • Definition of the instruction
  • Usage
  1. Operators

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.

PreviousMULNextFunctions

Last updated 1 year ago