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 What are the different types of data transfer instructions in Assembly language.md
Abdul Wahab Junaid0cf983effbe2
diff --git a/Assembly language/Basics of Assembly language/What are the different types of data transfer instructions in Assembly language.md b/Assembly language/Basics of Assembly language/What are the different types of data transfer instructions in Assembly language.mdnew file mode 100644index 0000000..3c26cd6--- /dev/null+++ b/Assembly language/Basics of Assembly language/What are the different types of data transfer instructions in Assembly language.md@@ -0,0 +1,73 @@+In assembly language programming, data transfer instructions are used to move data between different locations, such as registers, memory, and immediate values. These instructions are fundamental for manipulating and managing data within a program. Here are the common types of data transfer instructions:++1. **Move (MOV):**+ - **Description:** Transfers data from a source to a destination.+ - **Example:**+ ```assembly+ MOV AX, BX ; Move the contents of register BX to register AX+ MOV [SI], CX ; Move the contents of register CX to the memory location pointed to by SI+ ```++2. **Load (LD) and Store (ST):**+ - **Description:** Load and store instructions move data between registers and memory.+ - **Example:**+ ```assembly+ LD R1, [Address] ; Load the contents of the memory address into register R1+ ST [Address], R2 ; Store the contents of register R2 into the memory address+ ```++3. **Exchange (XCHG):**+ - **Description:** Exchanges the contents of two operands.+ - **Example:**+ ```assembly+ XCHG AX, BX ; Exchange the contents of registers AX and BX+ ```++4. **Push and Pop:**+ - **Description:** Push places a value onto the stack, and pop retrieves a value 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+ ```++5. **Load Effective Address (LEA):**+ - **Description:** Loads the effective address (memory address) into a register.+ - **Example:**+ ```assembly+ LEA SI, [Array] ; Load the effective address of the array into register SI+ ```++6. **Load Immediate (LIM):**+ - **Description:** Loads an immediate value into a register.+ - **Example:**+ ```assembly+ LIM AX, 10 ; Load the immediate value 10 into register AX+ ```++7. **Move with Zero/Sign Extension (MOVSX, MOVZX):**+ - **Description:** Move with sign or zero extension, used for converting between different data sizes.+ - **Example:**+ ```assembly+ MOVZX AX, AL ; Move with zero extension from AL to AX+ MOVSX BX, CL ; Move with sign extension from CL to BX+ ```++8. **Load String (LODS) and Store String (STOS):**+ - **Description:** Used for loading and storing strings.+ - **Example:**+ ```assembly+ LODS AL, [SI] ; Load the byte at the memory location pointed to by SI into AL+ STOS [DI], AX ; Store the contents of AX into the memory location pointed to by DI+ ```++9. **Block Move (e.g., MOVSB, MOVSW, MOVSD):**+ - **Description:** Moves blocks of data between memory locations.+ - **Example:**+ ```assembly+ MOVSB ; Move a byte from the address in DS:SI to ES:DI+ MOVSW ; Move a word (16 bits) from the address in DS:SI to ES:DI+ MOVSD ; Move a doubleword (32 bits) from the address in DS:SI to ES:DI+ ```++These instructions provide the means to transfer data within a program, whether between registers, between registers and memory, or within memory itself. The specific instructions and their syntax can vary based on the architecture and assembly language used. Programmers need to consult the documentation for the specific architecture to determine the available data transfer instructions and their usage.