Assembly Language Adventures: Complete Course
4.3 (265 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
3,092 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Assembly Language Adventures: Complete Course to your Wishlist.

Add to Wishlist

Assembly Language Adventures: Complete Course

Learn the language of your computer
4.3 (265 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
3,092 students enrolled
Created by xor pd
Last updated 11/2016
English
Price: $30
30-Day Money-Back Guarantee
Includes:
  • 29 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Learn to code on the x86 Architecture using Assembly Language
  • Gain solid understanding about low level concepts.
  • Understand how your computer works
  • Become a tough person
View Curriculum
Requirements
  • No prior knowledge is assumed!
Description

Learn Assembly Language

The x86 Adventures series teaches you your computer's language - x86 Assembly language, from scratch. No prior knowledge is assumed.

[Complete Course]

This is the full collection of x86 Assembly Adventures. It covers everything from the real basics to being an independent (and tough) x86 Assembly programmer.

Main topics covered:

  • The Binary System
  • The x86 Architecture
  • Intro to Flat Assembler
  • Branching
  • Signed and Bitwise Operations
  • Memory
  • Strings
  • Subroutines and the Stack
  • Reading the Manuals
  • Debugging
  • Dealing with Windows API

Why learn x86 Assembly Language?

  • You are the kind of person who really likes to know how things work. In this course you are going to get solid understanding on how computer programs work from the inside.
  • Become a better programmer - Knowing how things work down there will help you take better decisions, even as a high level programmer. If you were always wondering what is the stack, or what are those pointers everyone talks about, you came to the right place.
  • Write faster code - When you really want to get the most of your processor, writing in raw Assembly is needed. We are not going to talk about optimizations in this course, however you will get a solid foundations so that you can continue exploring on your own.
  • You want to become a reverse engineer or a security researcher, read the code of viruses or look for software vulnerabilities. As most of the time the original source code will not be available to you, solid understanding of x86 Assembly Language is mandatory.

Course structure

The course is made of video lectures. A lecture could be from a presentation, or a real world example, showing me doing stuff at the computer.

Almost every video lecture is accompanied by some kind of exercise (You will be told during the lecture, don't worry :) ) The exercises are open source. They are attached here as a rar file, however you could also get them on github. (See "About this course" video for more information).

It is crucial that you complete the exercises. You will learn a lot from the lectures, but it is pretty much a waste of your time and money if you don't do the exercises. (Or at least verify that you know how to do them, if you are more experienced).

Course tech stack

No prior knowledge is assumed for this course, but I do assume some things regarding your system, so make sure that everything here describes you:

  • You are using a Windows operation system. (The course videos use Windows 7). It is recommended to use at least Windows XP.
  • You have an intel x86 processor. (If you don't know what you have then you have x86 processor, trust me).

For the tech savvy, some more details about the tools we are going to use in this course:

  • Assembly flavour: x86 32 bits protected mode.
  • Assembler: The Flat Assembler (FASM)
  • Debugger: WinDbg.

Using Linux? Most of the exercises were ported to linux, however the videos show me using windows 7. Contact me if you are not sure.

Who is the target audience?
  • Absolute beginners
  • Experienced programmers
  • People who really want to know how things work
  • Programmers who want to improve their skills
  • Programmers who want to write faster code
  • Anyone who wants to get into the reverse engineering or security industry
Students Who Viewed This Course Also Viewed
Curriculum For This Course
Expand All 118 Lectures Collapse All 118 Lectures 29:09:32
+
Intro
4 Lectures 47:06

General information about the course: List of main subjects to be covered during this course, some technical details and some requirements for the course.

Preview 07:31

Explaining the file explorer - The program we use to view files on our computer. We also discuss Total Commander, which I am going to use during this course.

Preview 06:04

Explaining the Hex Editor - A program that allows us to view the internal structures of files inside our computer. Specifically we discuss the HxD Hex Editor.

Preview 15:53

We discuss Text Editors - programs that are used to view and edit text files inside our computer. We introduce notepad, notepad++, and a bit of vim.

Preview 17:38
+
The Binary numeric system
8 Lectures 02:12:03

We discuss the idea of numeric bases, and specifically we take a look at base 10 and base 2. Finally we have some examples of addition and subtraction in base 2.

Preview 23:36

We introduce three ways to convert numbers between different numeric representations: Direct evaluation, Finding largest power and Remainder evaluation.

Preview 23:17

We discuss how to decide which conversion method to use in different cases, and also show a few examples of converting numbers between different bases.

Preview 12:55

We discuss the Hexadecimal base (Base 16), and show its special relation to base 2.

Preview 22:33

We answer the question: Why is every hex digit is represented by exactly 4 binary digits?

Preview 09:06

We discuss the subtraction operation, and also negative numbers, in the base 10 representation. We study how to invoke subtraction using only the addition operation.

Signed Numbers (Part 1)
15:17

We introduce the two's complement representation, which allows us to deal with signed numbers in base 2, just like we did previously in base 10.

Signed Numbers (Part 2)
09:05

We look at examples of signed addition, we deal with some exceptions regarding
the two's complement representation, then we view a graphical representation of
the positive and negative numbers in the two's complement, and finally we
discuss some philosophy of representation.

Signed Numbers (Part 3)
16:14
+
x86 Architecture
8 Lectures 01:51:52

Basic history of the x86 architecture: The first processors in the family, the idea of backwards compatibility in the x86 architecture, and the different modes inside the x86 processors.

Basic History
18:30

We explain how programs are stored in memory, and how they are executed by the processor. Next we study about the x86 32-bit registers.

Basic Structure
20:16

We learn about the general structure of x86 instructions, and we discuss the MOV instruction.

First Instructions (Part 1)
13:23

We introduce the ADD and SUB instructions.

First Instructions (Part 2)
21:51

We introduce the INC, DEC and MUL instructions.

Basic Arithmetic (Part 1)
14:52

We introduce the DIV instruction.

Preview 10:38

We show examples for exceptions generated by using the DIV instruction.

Basic Arithmetic (Part 3)
04:36

We look at some examples of using the DIV instruction (With numeric examples). Finally we summarize the Basic Arithmetic series of lessons.

Basic Arithmetic (Part 4)
07:46
+
Introduction to FASM
9 Lectures 02:29:30

Introducing FASM - The Flat Assembler.

We discuss a few different common assemblers, and finally we describe FASM, and a few different reasons to use FASM. We end with a short description of how to install FASM. We will expand on this in the next lessons.

fasm intro
11:39

Fasm installation. We take a look at Fasm's website, and explain how to download and install Fasm.

fasm installation
21:29

We assemble our first program - bare.asm, and view the generated file in a hex editor.

First Programs - bare
23:13

We take a look at the program console.asm, which is our first console program. We discuss the source code of console.asm

First Programs - console (Part 1)
18:11

We try to assemble the console.asm program, and we have to fix the INCLUDE environment variable to make that happen. Finally we manage to assemble and run the program. We then analyze the output file with a hex editor.

First Programs - console (Part 2)
21:03

We introduce first_program.asm. This is our first program that actually has input and output. We take a look at the source code, and compare it to console.asm, the previous program. Later we try to assemble the program. For that task, we have to update the INCLUDE environment variable. Finally we run the program, and analyze the output of the program.

First Programs - first program (Part 1)
19:45

We create our own program, based on first_program.asm. Our program will read two numbers from the user, add those two numbers, and then print the result back to the console.

First Programs - first program (Part 2)
07:25

We introduce different examples of assembly time errors, and how to deal with them.
We begin with the Write Failed Error.

Basic Assembly Errors (Part 1)
11:31

We introduce more examples of assembly time errors and how to deal with them:
File not found error, Undefined Symbol Error, Illegal Instruction Error, Sizes
don't match error, Another Undefined symbol error and finally Invalid Operand
error.

Basic Assembly Errors (Part 2)
15:14
+
Branching
13 Lectures 03:30:34

We introduce the idea of branching: Having our program run in a nonlinear
fashion. We then discuss the EIP register.

Branching Intro (Part 1)
12:13

We introduce the JMP instruction, we discuss labels, and we view a simple
example of using the JMP instruction.

Branching Intro (Part 2)
14:00

We take a look at two examples using the JMP instruction: An infinite loop, and an example of skipping instructions using the JMP instruction.

JMP Examples
13:45

We introduce the Flags register, and discuss the Zero flag.

Flags Register (Part 1)
12:29

We discuss the Sign flag and Carry flag. Then we look at a few examples about the Carry Flag.

Flags Register (Part 2)
13:40

We discuss the Overflow flag and view different examples regarding the Overflow flag.

Flags Register (Part 3)
14:33

We compare the behavior of the Overflow and Carry flags. We also view different
ways of using the Overflow flag and Carry flag for the Signed and Unsigned
numbers.

Flags Register (Part 4)
13:18

We describe the idea of conditional branching, and see some examples of using the JZ and JNZ conditional branching instructions. We then briefly mention some other conditional branching instructions.

Basic Conditional Branching
17:48

We introduce the CMP instruction, and the idea of comparing numbers. Then we discuss unsigned and signed comparison, and we introduce specialized instructions for unsigned and signed comparisons.

Preview 22:50

We describe signed comparison in a more detailed fashion, and add some note about writing readable code with specialized jump instructions.

More Conditional Branching (Part 2)
14:31

We introduce the idea of Structured Branching and its advantages for writing good code. We then discuss the pattern of conditional execution.

Structured Branching (Part 1)
17:23

We discuss the pattern of loops, and breaking from loops.

Structured Branching (Part 2)
23:56

We introduce some branching rules of thumb. Then we show an example of simplifying a spaghetti code using the idea of Structured Branching.

Structured Branching (Part 3)
20:08
+
Signed Operations
3 Lectures 40:52

We learn about the NEG instruction, and we discuss the concept of sign
extension. We introduce the instructions MOVZX and MOVSX.

Signed Operations (Part 1)
14:07

We discuss the differences between the MOVZX and MOVSX instructions. Then we
study the instructions CBW, CWDE, CWD, CDQ.

Signed Operations (Part 2)
11:13

We introduce the IMUL and IDIV instructions, the sign aware versions of the MUL and DIV instructions. We explain how they work, and finally show an example of using those instructions.

Signed Operations (Part 3)
15:32
+
Bitwise Operations
7 Lectures 01:56:51

We introduce the idea of basic statements, and the basic operators NOT, AND and OR.

Intro to Boolean Algebra (Part 1)
09:21

We discuss the truth tables and Venn diagrams of the basic operators (NOT, AND,
OR). Then we view a few examples involving the basic operators.

Intro to Boolean Algebra (Part 2)
19:54

Basic properties of the NOT, AND and OR operators: Double negation, Commutative laws, Associative laws, Distributive laws. Finally we show an example of using Venn diagram to verify the truthfulness of an equation.

Intro to Boolean Algebra (Part 3)
10:55

We introduce De Morgan's laws, followed by a few examples of simplifying statements. Then we discuss the XOR operator. Finally further research subjects are mentioned.

Intro to Boolean Algebra (Part 4)
21:18

We introduce the NOT, AND, OR and XOR instructions. Then we discuss Bit Shifting using the SHL and SHR instructions.

Bitwise Instructions (Part 1)
19:58

We discuss arithmetic shifting (Shifting that understands the sign) using the SAL and SAR instructions. Finally we introduce the ROL and ROR instructions, used for bit rotation.

Bitwise Instructions (Part 2)
17:01

We study some basic bit manipulation techniques: Extracting one specific bit from a number, Counting the number of 1-s in a binary number, Calculating modulo powers of two using bit operations and finally squeezing a few small numbers into the same container.

Practical Bit Games
18:24
+
Memory
17 Lectures 04:29:45

We first discuss the reasons for which we need more data in our programs. Next
we describe the basic model of the computer memory, and discuss memory devices
which reside outside the processor.

Memory Intro (Part 1)
14:33

We discuss memory abstraction mechanisms supported by the x86 processor. We
mention Segmentation and Paging, and show a few illustrations of the Paging
mechanism.

Memory Intro (Part 2)
13:24

We introduce the program reverse.asm, which uses the memory (The RAM) to reverse
a list of numbers. We run the program and analyze the source code.

Memory Examples - reverse (Part 1)
14:43

We analyze the internal structure of the output executable file of reverse.asm using a hex editor.
Next we continue with reverse_constant.asm, which improves reverse.asm by using a constant.

Memory Examples - reverse (Part 2)
12:14

We introduce the get_addr.asm program, which demonstrate the meaning of labels, and possible syntax when using labels.

Memory Examples - get_addr
15:49

The program corrupt.asm demonstrates what happens when we try to access memory that we do not own. fix_corrupt.asm demonstrates how to fix corrupt.asm, and finally fix_corrupt_small.asm uses the bss section to get a much more efficient solution.

Memory Examples - corrupt
17:00

We discuss different ways of defining data, and inspect the output for each data definition. We learn about bytes, words, dwords, arrays and a bit more complex data definitions.

Data definition
15:36

We introduce the PE sections, and show an example of a program that contains different sections: text, data, bss and idata. Finally we inspect the resulting executable file with a hex editor.

Data sections
22:43

We show how to access memory using assembly instructions. In this lecture we study how to count addresses properly, how to store a dword in memory (Endianity), advanced addressing with the brackets syntax, and some limitations when accessing memory in the x86 architecture.

Basic Memory Instructions
26:09

We introduce the LEA instruction. We discuss the syntax of this instruction, and then show a few examples of using the LEA instruction.

LEA
19:14

We explain the need for a way to organize our data, and propose the structure syntax as a solution. We then discuss different ways of defining and declaring structures.

Structures (Part 1)
23:36

We show different examples of using structures, and then we discuss the possibility of nesting structures.

Structures (Part 2)
15:57

We discuss Unions, and we view an example of using unions (Unions IPV4 example).

Structures (Part 3)
13:35

We take a look at a few examples of memory constructs: Array of structures and
Two dimensional table. We put emphasis on the techniques of storing those
constructs inside our program's linear memory.

Memory Ideas (Part 1)
16:17

We show an example of storing a multiplication table into a two dimensional
array. Then we discuss the possibility of storing higher dimensional arrays
inside the program's memory.

Memory Ideas (Part 2)
09:47

We discuss the memory construct of Binary Tree, and show an example of representing a Binary Tree in memory.

Memory Ideas (Part 3)
09:39

We describe a few rules of thumb regarding address arithmetic. Those rules help distinguish between addresses and offsets.

Addressing Rules Of Thumb
09:29
+
Strings
8 Lectures 01:47:00

We introduce the ASCII standard for encoding text as numbers inside the computer. We also mention the Unicode standard.

ASCII
08:47

We introduce the Character Map windows program, which is a tool for viewing different characters and their corresponding ASCII or Unicode codes.

Character Map
02:07

In this video we explain how to represent text strings inside our own assembly programs. We also introduce two schools of strings: Length prefix and Null terminated strings.

Preview 15:55

We show an example of using Unicode characters inside a Fasm assembly program. In this example we want to store two Chinese characters in memory. Eventually we assemble the program and view the output file inside a hex editor.

UTF8 Example
07:54

We introduce the STOS instruction, and show a simple example of using this
instruction. Then we discuss the direction flag and its significance.

First String Instructions (Part 1)
12:05

We introduce the instructions LODS, MOVS, and we show simple usage examples for
both of those instructions.

First String Instructions (Part 2)
18:16

We introduce the REP prefix, and use it together with STOSB to clear an array. Next we introduce the SCAS instruction. Finally we introduce the REPNZ prefix, and use it together with the SCAS instruction to search for the NULL terminator of a string.

REP Prefixes (Part 1)
21:43

We discuss the REPZ and the REPNZ prefixes. Then we introduce the CMPS instruction, and show an example of using CMPS with the REPZ prefix to check the equality of two memory buffers.

REP Prefixes (Part 2)
20:13
+
Subroutines and The Stack
8 Lectures 02:12:29

Subroutines are independent pieces of code. We explain the need for subroutines, and next we try to create our own subroutines using a simple JMP instruction. This first attempt is not so successful, but it prepares us for a more advanced idea of implementing subroutines, which we are going to see in the next lessons.

Subroutines Intro
21:15

We study the Stack data structure. Then we study the x86 stack implementation and instructions (PUSH and POP). Eventually we see some simple examples of using the stack.

The Stack
20:27

We show an example of using the CALL and RET instruction to implement a
subroutine. Then we study CALL and RET in detail.

Call and Ret (Part 1)
10:01

We see a few examples of using the CALL and RET instructions. Then we explain
the Stack's meaning with respect to function calls.

Call and Ret (Part 2)
17:05

We explore different methods of communicating with subroutines: Registers, Global data and the Stack.

Calling Conventions (Part 1)
13:29

We discuss the idea of calling conventions. Then we introduce the CDECL and
STDCALL calling conventions, and compare them.

Calling Conventions (Part 2)
12:34

We introduce the EBP register, and we explain how to use it to hold the stack frame in our functions. Next we discuss local variables, and how to use the stack to store local variables for the current function.

Local State (Part 1)
19:38

We introduce the idea of The Call Stack, and next we study the ENTER and LEAVE instructions, which are shortcuts for creating and destroying a function's stack frame.

Local State (Part 2)
18:00
4 More Sections
About the Instructor
xor pd
4.2 Average rating
343 Reviews
8,988 Students
2 Courses
Low level technology training

xorpd is a technology training company, specializing in the low level aspects of technology. It is the destination for anyone that wants to really understand how things work, from the inside.

While many believe that some technologies are long lost gone, we believe that knowing how things really work is what gives you the edge, and help you become a top developer.

Assembly language programming was taught so far in ways that appeal to the experienced developer, however unreachable for the beginner. We put emphasis on creating material that is easy to learn and understand, even for the absolute beginner.