This Repository is a collection of different ethical hacking tools and malware's for penetration testing and research purpose written in python, ruby, rust, c++, go and c.
The 80x86 architecture, also known as the x86 architecture, encompasses a variety of addressing modes used in assembly language programming to access operands (data) stored in memory or registers. Addressing modes determine how the effective address of an operand is computed, allowing for flexible access to data. Here’s a detailed overview of the key addressing modes in the 80x86 architecture:
1. Immediate Addressing Mode
- Description: The operand is specified explicitly in the instruction.
- Example:
MOV AX, 5
This instruction moves the value5directly into theAXregister.
2. Register Addressing Mode
- Description: The operand is located in a register.
- Example:
MOV BX, AX
This instruction moves the content of theAXregister into theBXregister.
3. Direct Addressing Mode
- Description: The effective address of the operand is given directly in the instruction.
- Example:
MOV AX, [1234h]
This instruction moves the data located at the memory address1234hinto theAXregister.
4. Indirect Addressing Mode
- Description: The effective address of the operand is specified indirectly through a register.
- Example:
MOV AX, [BX]
This instruction moves the data from the memory address contained in theBXregister into theAXregister.
5. Indexed Addressing Mode
- Description: Combines a base address from a register with an index (offset) to compute the effective address.
- Example:
MOV AX, [SI + 100]
This instruction moves the data from the memory address calculated by adding100to the content of theSIregister into theAXregister.
6. Base-Indexed Addressing Mode
- Description: Combines a base address from one register and an index from another register.
- Example:
MOV AX, [BX + SI]
This instruction moves the data from the memory address calculated by adding the contents ofBXandSIinto theAXregister.
7. Relative Addressing Mode
- Description: The effective address is determined by the sum of the instruction pointer (IP) and a signed offset.
- Example:
JMP label
Here, the instruction jumps to the address computed by adding the offset oflabelto the current instruction pointer.
8. Segment Addressing Mode
- Description: Used to access memory in the segmented memory model. The effective address is calculated using a segment register and an offset.
- Example:
MOV AX, [DS:1234h]
This instruction moves the data from the memory address calculated using the data segment (DS) and offset1234hinto theAXregister.
9. Stack Addressing Mode
- Description: Operands are accessed from the stack. The stack pointer (SP) register is used to determine the effective address.
- Example:
PUSH AX
This instruction pushes the value in theAXregister onto the stack.
10. Auto-increment and Auto-decrement Addressing Modes
Auto-increment: The address in a register is automatically incremented after accessing the operand.
- Example:
MOV AX, [SI+]
This instruction moves the data from the memory address in theSIregister and then incrementsSI.
- Example:
Auto-decrement: The address in a register is automatically decremented before accessing the operand.
- Example:
MOV AX, [-DI]
This instruction decrements theDIregister and then moves the data from the new address intoAX.
- Example:
Conclusion
Understanding these addressing modes is crucial for assembly language programming on the 80x86 architecture, as they provide flexibility in data access and manipulation. Each mode has its specific use cases, and choosing the appropriate one can significantly impact program efficiency and functionality.