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:
- 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.
- 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.
- 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.
- 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.
- Comparison Instructions:
- CMP: Compare two values.
- I/O Instructions:
- IN: Read data from an input port.
- OUT: Write data to an output port.
- 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.
- 作者:现代数学启蒙
- 链接:https://www.math1234567.com/article/commonassemblyinstructions
- 声明:本文采用 CC BY-NC-SA 4.0 许可协议,转载请注明出处。
相关文章