Introduction to Assembly

Assembly is the second lowest language, written for specific architecture.

Why assembly understanding is important?

Lets see how a processor work.

We want to add 6 and 2. How it will look in machine code →

  • We send instruction to add → 0100

  • We send the numbers to be added → 6 and 2 → 0110 and 0010

  • Final Operation → 0100 0110 0010

This is Machine code. And by looking at Machine code we cannot always understand what is happening.

Enters Assembly Language!

It equates to machine code but is more readable. It can be directly translated into machine code , but it uses mnemonics to represent the instructions to make it easier to understand.

Above example of adding 6 and 2 in Assembly will be

  • mov eax, 6

  • add eax, 2

This is more readable and understandable at the same time. Therefore, Assembly language is helpful to understand a compiled code(as source code will not available), specifically executable which we will be looking at in Malware Analysis.

Assembler → It translate to native binary code.

Different Assembler

  • MASM (Microsoft Assembler)

  • NASM (Native Assembler)

  • TASM (Turbo Assembler)

  • GNU Debugger

Different form of Assembly language

→ Intel → ARM → MIPS

We have different architectures. → Intel-32 Bit → Intel-64 Bit

Last updated