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 operator
  • Syntax
  • Where :
  • Usage
  1. Operators

ADD

ADD (Addition) operator:

Name of the operator

The "ADD" (Addition) operator is used in programming languages to add two register or to add a value to a specified destination.

Syntax

ADD RX, Y

Where :

  • RX: Represents the destination register where the value will be moved.

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

Usage

  • Addition of Register Values:

    ADD R1, R2
    • Detail: This example demonstrates the addition of the values in registers R1 and R2. The result is stored in register R1.

  • Addition of Immediate Value:

    ADD R3, #10
    • Detail: This code adds the immediate value 10 to the contents of register R3. The result is stored back in register R3.

PreviousOperatorsNextSUB

Last updated 1 year ago