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.
JavaScript algorithmsartificial-intelligencebugbountycryptographycyber-threat-intelligencecybersecurity-projectsethical-hackinghacking-toolsmalwarenessusnetwork-monitoringnetwork-securitynmapportscannerpythonpythonprojectsthreat-intelligencevirus-scanning
Create addressing modes in Assembly language.md
Abdul Wahab Junaid6e06e977c43b
diff --git a/Assembly language/Basics of Assembly language/addressing modes in Assembly language.md b/Assembly language/Basics of Assembly language/addressing modes in Assembly language.mdnew file mode 100644index 0000000..b986bf9--- /dev/null+++ b/Assembly language/Basics of Assembly language/addressing modes in Assembly language.md@@ -0,0 +1,74 @@+Addressing modes in assembly language define the way in which operands (data) are specified for instructions. These modes describe the method used to determine the effective address of the data to be manipulated by an instruction. The choice of addressing mode can significantly impact the flexibility, efficiency, and readability of assembly language code. Here are some common addressing modes:++## 1. **Immediate Addressing:**+ - **Description:** The operand is a constant value specified directly in the instruction.+ - **Example:**+ ```assembly+ MOV AX, 5 ; Load the immediate value 5 into register AX+ ```++## 2. **Register Addressing:**+ - **Description:** The operand is the content of a register.+ - **Example:**+ ```assembly+ MOV AX, BX ; Move the contents of register BX into register AX+ ```++## 3. **Direct Addressing:**+ - **Description:** The operand is located at a specific memory address.+ - **Example:**+ ```assembly+ MOV AX, [1000] ; Move the contents of memory address 1000 into register AX+ ```++## 4. **Indirect Addressing:**+ - **Description:** The operand is located at the memory address stored in a register or another memory location.+ - **Example:**+ ```assembly+ MOV AX, [BX] ; Move the contents of the memory address in register BX into register AX+ ```++## 5. **Indexed Addressing:**+ - **Description:** The operand is located at the sum of a base address and an index or offset.+ - **Example:**+ ```assembly+ MOV AX, [SI+10] ; Move the contents of the memory address (SI + 10) into register AX+ ```++## 6. **Base-Register Addressing:**+ - **Description:** Similar to indexed addressing but with a fixed offset.+ - **Example:**+ ```assembly+ MOV AX, [BX+20] ; Move the contents of the memory address (BX + 20) into register AX+ ```++## 7. **Relative Addressing:**+ - **Description:** The operand is located at a memory address relative to the current instruction.+ - **Example:**+ ```assembly+ JMP Label ; Jump to the instruction at the memory location labeled 'Label'+ ```++## 8. **Base-Register with Index Addressing:**+ - **Description:** Combines the base and index registers with an offset.+ - **Example:**+ ```assembly+ MOV AX, [BX+SI+10] ; Move the contents of the memory address (BX + SI + 10) into register AX+ ```++## 9. **Stack Addressing:**+ - **Description:** Operands are implicitly or explicitly pushed onto or popped from the stack.+ - **Example:**+ ```assembly+ PUSH AX ; Push the contents of register AX onto the stack+ POP BX ; Pop the top value from the stack into register BX+ ```++## 10. **Immediate with Offset Addressing:**+ - **Description:** Combines an immediate value with an offset.+ - **Example:**+ ```assembly+ MOV AX, [1000+10] ; Move the contents of the memory address (1000 + 10) into register AX+ ```++The choice of addressing mode depends on the specific requirements of the instruction and the architecture. Different addressing modes offer varying degrees of flexibility, efficiency, and complexity, and programmers must choose the most appropriate mode for a given task. Addressing modes play a crucial role in determining how operands are located and manipulated during the execution of assembly language instructions.