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

MUL

MUL (Multiplication) operator:

Name of the instruction

The "MUL" (Multiplication) operator is used in programming languages to multiply two register or to multiply a value to a specified destination.

Definition of the instruction

Syntax

MUL RX, Y

Where :

  • RX: Represents the destination register where the product of RX and Y will be moved.

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

Usage

  • Multiplication of Register Values:

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

  • Multiplication with Immediate Value:

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

PreviousSUBNextDIV

Last updated 1 year ago