Professional Documents
Culture Documents
Most Commonly Used Instructions in Assembly Language Programming
Most Commonly Used Instructions in Assembly Language Programming
Most Commonly Used Instructions in Assembly Language Programming
Programming
1. MOV (Move)
Description: Copies the contents of one operand into another operand.
Syntax: MOV destination, source
Example: MOV AX, BX copies the contents of BX into AX.
2. ADD (Addition)
Description: Adds the source operand to the destination operand.
Syntax: ADD destination, source
Example: ADD AX, BX adds BX to AX.
3. SUB (Subtraction)
Description: Subtracts the source operand from the destination
operand.
Syntax: SUB destination, source
Example: SUB AX, BX subtracts BX from AX.
4. INC (Increment)
Description: Increments the value of the operand by 1.
Syntax: INC operand
Example: INC CX increments the value of CX by 1.
5. DEC (Decrement)
Description: Decrements the value of the operand by 1.
Syntax: DEC operand
Example: DEC DX decrements the value of DX by 1.
6. CMP (Compare)
Description: Compares two operands and sets flags based on the result.
Syntax: CMP operand1, operand2
Example: CMP AX, BX compares AX and BX.
7. JMP (Jump)
Description: Transfers control to the specified location.
Syntax: JMP destination
Example: JMP label transfers control to the specified label.
8. JE (Jump if Equal)
Description: Jumps to the specified location if the two compared
operands are equal.
Syntax: JE destination
Example: JE label jumps to the specified label if the comparison result is
equal.
9. JNE (Jump if Not Equal)
Description: Jumps to the specified location if the two compared
operands are not equal.
Syntax: JNE destination
Example: JNE label jumps to the specified label if the comparison result
is not equal.
10. JG (Jump if Greater)
Description: Jumps to the specified location if the first operand is
greater than the second operand.
Syntax: JG destination
Example: JG label jumps to the specified label if the first operand is
greater than the second operand.
11. JL (Jump if Less)
Description: Jumps to the specified location if the first operand is less
than the second operand.
Syntax: JL destination
Example: JL label jumps to the specified label if the first operand is less
than the second operand.
12. CALL (Call Procedure)
Description: Calls a procedure or subroutine.
Syntax: CALL procedure_name
Example: CALL myProcedure calls the procedure named myProcedure.
13. RET (Return from Procedure)
Description: Returns control from a procedure or subroutine.
Syntax: RET
Example: RET returns control from the current procedure.
14. INT (Interrupt)
Description: Triggers a software interrupt.
Syntax: INT interrupt_number
Example: INT 21h triggers interrupt 21h (for DOS services).
15. LOOP (Loop)
Description: Executes a block of code a specified number of times.
Syntax: LOOP destination
Example: LOOP label repeats the loop specified by the label.
16. NOP (No Operation)
Description: No operation is performed.
Syntax: NOP
Example: NOP does nothing and proceeds to the next instruction.