0Pricing
Reverse Engineering & Binary Analysis Basics · 课时

x86/x64 汇编基础

入门了解 x86 和 x64 汇编语言的基本指令与语法。

x86/x64 汇编基础 是 CoddyKit 上的免费 Reverse Engineering & Binary Analysis Basics 课时。 这是第 1 节课,共 4 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 Reverse Engineering & Binary Analysis Basics 学习路径的一部分,你的进度在网页和 CoddyKit 应用中同步。 Reverse Engineering & Binary Analysis Basics 课程共包含 4 节课。

本课时的部分内容尚未翻译,以英文显示。

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 register EBX into register EAX.
  • MOV RCX, RDX: Copy the value from RDX into RCX (64-bit version).
  • MOV EAX, 123: Copy the constant value 123 into register EAX.

Arithmetic: ADD and SUB

Beyond just moving data, assembly allows basic arithmetic operations. Two common ones are ADD and SUB.

  • ADD destination, source: Adds the source value to the destination value, storing the result in destination.
  • SUB destination, source: Subtracts the source value from the destination value, storing the result in destination.

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 + EBX
  • SUB RCX, 10: RCX = RCX - 10
  • ADD RDX, R8: RDX = RDX + R8 (using a 64-bit general-purpose register R8)

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, 123 is 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), and SUB (subtract).
  • The concept of immediate values and operands.

Next, we'll dive deeper into registers and how they interact with memory!

常见问题解答

「x86/x64 汇编基础」课时是免费的吗?

是的 — 「x86/x64 汇编基础」的完整文本可在网页上免费阅读。要进行交互式练习(内置代码编辑器和全天候 AI 导师)并解锁 Reverse Engineering & Binary Analysis Basics 课程的其余内容,请升级到 CoddyKit PRO。 Reverse Engineering & Binary Analysis Basics 课程共包含 4 节课。

「x86/x64 汇编基础」这节课中我会学到什么?

入门了解 x86 和 x64 汇编语言的基本指令与语法。 你通过在浏览器中直接运行的动手代码来练习 Reverse Engineering & Binary Analysis Basics,全天候 AI 导师会在你学习这节课的过程中回答你的问题。

学习 Reverse Engineering & Binary Analysis Basics 需要有经验吗?

无需任何先前经验。CoddyKit 上的 Reverse Engineering & Binary Analysis Basics 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 1 节课,共 4 节。

「x86/x64 汇编基础」课时需要多长时间?

大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。

我能在这节 Reverse Engineering & Binary Analysis Basics 课中编写并运行代码吗?

能。每节 Reverse Engineering & Binary Analysis Basics 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。

此课程中的所有课时

  1. x86/x64 汇编基础
  2. 寄存器与内存操作
  3. 控制流与函数调用
  4. 栈与调用约定
← 返回 Reverse Engineering & Binary Analysis Basics