Secure coding

How to implement common logic constructs such as if/else/loops in x86 assembly

February 17, 2021 by Srinivas

Introduction to x86 assembly: What are computer instruction sets (ISA)?

X86 is an assembly language. It is also backward compatible. It is said to be compatible with systems going back 1972. Object codes can be created by x86 assembly language. The CPU using x86 is fed instructions called mnemonics. Compilers are used to create machine code from assembly code. Mnemonics represent x86 assembly instructions to operating systems. Operands can be combined with mnemonics to create opcode. X86 is an 32-bit programming language. It works by sending assembler directives and instructions. Interestingly there are multiple assembly languages that are used to create x86 machine code. 

What is x86 assembly?

Assembly coded programs aren’t very large and because of that they work much faster and communicate with greater ease with the machine. Assembly language can also be called machine language. The central processing unit (CPU) requires its instructions in machine language. Assembly instructions require a code that doesn’t change. So, the assembly instruction allocates a mnemonic device to use a machine opcode. 

Registers are like bins and processors are organized with many registers where information can be stored. Keeping the processor organized is important work so registers are the most important pieces of the CPU, especially since they allow the processor to run faster.


X86 assembly programs are fast, primarily because they are simple. By in large speed dependent programming is written in X86 assembly language. Assembly programs are also small and powerful. X86 assembly is also good for looking for back doors and viruses. The truly best feature of Assembly language is the fact that it speaks to computers in their own language. It gives the programmer a greater sense of control of the process. 



  1. /topic/x86-assembly-language-applicable-to-reverse-engineering-the-basics-part-1/
  2. /topic/x86-assembly-language-part-1/
  3. /topic/x86-assembly-reverse-engineering-part-2/
  4. /topic/x86-assembly-language-part-3-1/
  5. /topic/x86-assembly-language-part-3-2/
  6. /topic/x86-assembly-language-part-2/


Posted: February 17, 2021


We've encountered a new and totally unexpected error.

Get instant boot camp pricing

Thank you!

A new tab for your requested boot camp pricing will open in 5 seconds. If it doesn't open, click here.

Articles Author
View Profile

Srinivas is an Information Security professional with 4 years of industry experience in Web, Mobile and Infrastructure Penetration Testing. He is currently a security researcher at Infosec Institute Inc. He holds Offensive Security Certified Professional(OSCP) Certification. He blogs Email: