Fundamentos del ensamblador x86/x64
Familiarícese con las instrucciones y la sintaxis fundamentales del lenguaje ensamblador x86 y x64.
Fundamentos del ensamblador x86/x64 es una lección gratuita de Reverse Engineering & Binary Analysis Basics en CoddyKit. Esta es la lección 1 de 4. Puedes leer la lección completa abajo gratuitamente — luego la practicas en el navegador con un editor de código integrado y un tutor de IA 24/7. Forma parte de la ruta de aprendizaje de Reverse Engineering & Binary Analysis Basics, y tu progreso se sincroniza en la web y la app de CoddyKit. El curso de Reverse Engineering & Binary Analysis Basics incluye 4 lecciones en total.
Partes de esta lección aún no han sido traducidas y se muestran en inglés.
What is Assembly Language?
Welcome to the world of assembly language! This is the lowest-level programming language that humans typically read and write.
It's a symbolic representation of machine code, which are the raw binary instructions that a computer's processor (CPU) understands and executes directly. Think of it as the CPU's native tongue.
RE's Low-Level View
For reverse engineers, understanding assembly language is crucial. When you analyze a compiled program, you rarely have the original source code.
Instead, you'll be looking at its assembly representation. Learning assembly helps you:
- Understand exactly how a program executes.
- Identify functions, data, and control flow.
- Uncover hidden behaviors or vulnerabilities.
x86 vs x64: The Difference
When we talk about x86/x64 assembly, we're referring to instruction sets for Intel and AMD processors. The main difference is the architecture's 'width':
- x86: Refers to 32-bit architecture.
- x64: Refers to 64-bit architecture, also known as AMD64 or Intel 64.
While x64 introduces more registers and wider data paths, many fundamental instructions remain similar, often with extended versions.
Basic Instruction Format
Assembly instructions generally follow a simple format: INSTRUCTION destination, source.
- INSTRUCTION: This is the operation to perform (e.g., move, add, subtract).
- destination: Where the result of the operation will be stored.
- source: The data or location to operate on.
Some instructions might have one operand, or none at all. The order (destination, source) is common in Intel syntax, which we'll use.
The MOV Instruction
The MOV instruction is one of the most fundamental. It stands for 'move' and is used to copy data from a source to a destination.
It's important to note that MOV doesn't 'cut' or 'remove' the data from the source; it simply copies it, leaving the source unchanged.
Its general form is: MOV destination, source
MOV Examples (Conceptual)
Let's look at some conceptual examples of MOV. We'll use common x86/x64 register names like EAX, EBX, RCX, etc., which are tiny storage locations inside the CPU. Don't worry about their exact function yet!
MOV EAX, EBX: Copy the value from registerEBXinto registerEAX.MOV RCX, RDX: Copy the value fromRDXintoRCX(64-bit version).MOV EAX, 123: Copy the constant value123into registerEAX.
Arithmetic: ADD and SUB
Beyond just moving data, assembly allows basic arithmetic operations. Two common ones are ADD and SUB.
ADD destination, source: Adds thesourcevalue to thedestinationvalue, storing the result indestination.SUB destination, source: Subtracts thesourcevalue from thedestinationvalue, storing the result indestination.
These operations modify the destination operand directly.
ADD/SUB Examples (Conceptual)
Here are some conceptual examples for ADD and SUB:
ADD EAX, EBX:EAX = EAX + EBXSUB RCX, 10:RCX = RCX - 10ADD RDX, R8:RDX = RDX + R8(using a 64-bit general-purpose registerR8)
Notice how the destination operand is updated with the result of the operation.
Immediate Values & Operands
In assembly, the terms 'operand' and 'immediate value' are important:
- Operand: A value or location that an instruction operates on. This can be a register, a memory address, or an immediate value.
- Immediate Value: A constant value that is encoded directly within the instruction itself. For example, in
MOV EAX, 123,123is an immediate value.
Understanding these terms helps you interpret what kind of data an instruction is handling.
Assembly Basics Check
Which of the following best describes the function of the MOV instruction in x86/x64 assembly?
Recap: Assembly Fundamentals
Great job! You've just taken your first steps into the world of assembly language for x86/x64 processors.
We covered:
- What assembly language is and why it's vital for reverse engineering.
- The basic instruction format:
INSTRUCTION destination, source. - Fundamental instructions like
MOV(copy),ADD(add), andSUB(subtract). - The concept of immediate values and operands.
Next, we'll dive deeper into registers and how they interact with memory!
Preguntas frecuentes
¿La lección «Fundamentos del ensamblador x86/x64» es gratis?
Sí — el texto completo de «Fundamentos del ensamblador x86/x64» es gratis para leer aquí en la web. Para practicarla de forma interactiva (editor de código integrado y tutor de IA 24/7) y desbloquear el resto del curso de Reverse Engineering & Binary Analysis Basics, actualiza a CoddyKit PRO. El curso de Reverse Engineering & Binary Analysis Basics incluye 4 lecciones en total.
¿Qué aprenderé en «Fundamentos del ensamblador x86/x64»?
Familiarícese con las instrucciones y la sintaxis fundamentales del lenguaje ensamblador x86 y x64. Practicas Reverse Engineering & Binary Analysis Basics con código real que ejecutas directamente en el navegador, y un tutor de IA 24/7 responde tus preguntas mientras trabajas en la lección.
¿Necesito experiencia previa para empezar Reverse Engineering & Binary Analysis Basics?
No se requiere experiencia previa. Reverse Engineering & Binary Analysis Basics en CoddyKit está estructurado para principiantes hasta estudiantes avanzados, así que puedes empezar aquí o desde el inicio y avanzar a tu ritmo. Esta es la lección 1 de 4.
¿Cuánto tiempo toma la lección «Fundamentos del ensamblador x86/x64»?
La mayoría de las lecciones de CoddyKit toman alrededor de 5–10 minutos. Cada una es compacta e interactiva, así que avanzas constantemente y retomas exactamente por donde dejaste en la web y la app.
¿Puedo escribir y ejecutar código en esta lección de Reverse Engineering & Binary Analysis Basics?
Sí. Cada lección de Reverse Engineering & Binary Analysis Basics incluye un editor de código integrado, así que escribes y ejecutas código real directamente en tu navegador y obtienes retroalimentación instantánea de IA — sin configuración local necesaria.
Todas las lecciones de este curso
- Fundamentos del ensamblador x86/x64
- Registros y operaciones de memoria
- Flujo de control y llamadas a funciones
- La pila y las convenciones de llamada