Chapter 0 > Introduction
Introduction
On this mini-course, we will cover the basics of the Assembly language.
We will start by discussing the Assembly language from CPU Registers and finish by writing a basic program using skills acquired from this course.
Prerequisites
Everything you need is a PC and a desire to learn :) If you have experience working with programming languages like C, C++, or even Python, you can skip some parts of the course if you are familiar with them.
What is Reverse Engineering?
First of all, what is reverse engineering? Reverse engineering is a process of disassembling a binary. Once you disassemble a binary, you will see the source code of the software and understand how it was written.
What is a binary?
A binary is a compiled piece of code. Let’s imagine that you are developing a super cool game in Python. When you run the .py
file on your computer, your Python code gets compiled into binary code (0s and 1s).
But why would that happen?
Your computer cannot understand code written in Python, Java, C++, or any other programming languages. High-level programming languages are developed to make it easy for people to write software. It would be way harder for people to write code in Assembly since it is almost the lowest-level programming language. That’s why high-level programming languages were developed.
The difference between low and high level is that low level is close to binary code, the language that computers speak. On the other hand, high-level programming languages are human-readable.
Code written in C:
1
2
3
4
5
6
#include <stdio.h>
int main()
{
printf("Hello World!");
}
The same code in Assembly:
1
2
3
4
5
6
7
8
9
10
11
.LC0:
.string "Hello World!"
main:
push rbp
mov rbp, rsp
mov edi, OFFSET FLAT:.LC0
mov eax, 0
call printf
mov eax, 0
pop rbp
ret
As you can see, C is more human-readable than Assembly. But don’t worry! I will cover everything, and you will be able to read Assembly code easily.