slug
type
status
category
summary
date
tags
password
icon
In assembly language, several instructions are commonly used across different architectures. Here are some of the most frequently used types of instructions:
  1. Data Movement Instructions:
      • MOV: Move data from one location to another.
      • PUSH/POP: Push data onto the stack or pop data from the stack.
      • LOAD/STORE: Load data from memory into a register or store data from a register into memory.
  1. Arithmetic Instructions:
      • ADD: Add two values.
      • SUB: Subtract one value from another.
      • MUL: Multiply two values.
      • DIV: Divide one value by another.
      • INC/DEC: Increment or decrement a value.
  1. Logical Instructions:
      • AND: Perform a bitwise AND operation.
      • OR: Perform a bitwise OR operation.
      • XOR: Perform a bitwise XOR operation.
      • NOT: Perform a bitwise NOT operation.
      • SHL/SHR: Shift bits left or right.
  1. Control Flow Instructions:
      • JMP: Jump to a specified address.
      • CALL: Call a subroutine.
      • RET: Return from a subroutine.
      • JZ/JNZ: Jump if zero / Jump if not zero.
      • JE/JNE: Jump if equal / Jump if not equal.
      • JG/JL: Jump if greater / Jump if less.
  1. Comparison Instructions:
      • CMP: Compare two values.
  1. I/O Instructions:
      • IN: Read data from an input port.
      • OUT: Write data to an output port.
  1. String Instructions (specific to some architectures like x86):
      • MOVS: Move string data.
      • CMPS: Compare string data.
      • SCAS: Scan string data.
      • LODS: Load string data.
      • STOS: Store string data.
These instructions form the backbone of assembly language programming, allowing for efficient and precise control of the hardware. Different architectures may have their specific instructions and variations, but these categories are broadly applicable.
7b Factorial in ASM, Pseudocode and Python8a Introduction to Databases
Loading...