
Explore the essentials of x86-64 assembly language, from computer architecture and data representation to debugging, instructions, bitwise operations, branches, arrays, and calling conventions.
Explore the basic computer system, including the cpu, memory, and system bus, and how bits form bytes, words, and addresses in x86 architecture.
Explore x86 processor mode, focusing on IA-32e 64-bit mode and compatibility with 16-bit and 32-bit programs. Learn about 64-bit registers, the RIP instruction pointer, and canonical 48-bit addresses.
Learn how computers use decimal, binary, and hexadecimal numbers, translate between formats, and convert between bases for registers and memory in x86 64-bit assembly.
Explore how computers interpret bits as numbers by examining unsigned and signed representations, including two's complement and the sign bit, and learn the numeric ranges for 8-bit formats.
Install SASM IDE, switch to NASM for x64 assembly, configure settings, write and build code, and run programs to debug and learn assembly.
Master the basic assembling and linking workflow: write assembly code in a text editor, generate an object file, and link to create an executable, with preprocessing and directives.
Explore the basic structure of an x86-64 program by writing your first assembly, including comments, include and section directives, data definitions, a global CMAIN label, and simple instructions.
Debug and learn assembly by stepping through code, watching registers and memory, and examining quadword counter. Use breakpoints and memory views to see how each instruction affects CPU state.
Define variables in the data section with a name, size, and initial value, such as sum as a quadword initialized to 20; access with square brackets and mov to rax.
Define numeric constants with equ to assign symbols like buffersize equ 500, enabling code to use buffer size and prevent later redefinition.
Compare x86-32 and x86-64 instructions, show 32-bit immediates truncation, and use 64-bit immediates via mov; explain sign extension, and 64-bit push/pop and call/jump rules.
Learn how the mov instruction transfers data between registers and memory, covering formats reg-immediate, reg-reg, memory-immediate, and memory-register, plus size rules and common pitfalls.
Explains the xchg instruction, which exchanges values between two registers or between a register and memory, with examples using rax, rdx, bx, and cx, and explains size rules and prohibitions.
Write x86-64 program that assigns 7 to varA and -1 to varB as qword variables, then exchange their values using rax as a temporary register and verify in debug mode.
Learn inc and dec instructions to modify registers and memory operands, including a byte-size counter in the data section, and note that immediate values are invalid.
Learn to use the negate instruction to reverse the sign of a register or memory value, with zero staying zero, as shown on rax, rbx, rcx, and a dword num.
Learn add and subtract instructions in x86-64 assembly, modifying the destination with immediate values, registers, or memory, using the same formats as mov and obeying size rules.
Explore the x86-64 rflags status flags—carry, zero, sign, and overflow—and learn how arithmetic and logical results set these flags and how the instructions affect them.
Learn how the carry flag indicates unsigned overflow and how add and subtract operations affect it, with al and bl examples and eflags in x86 64-bit assembly.
Identify how the overflow flag signals signed overflow for 8-bit results beyond -128 to 127. See examples: 100 plus 1 yields 101 (no overflow); 127 plus 1 yields 128 (overflow).
Explore the zero flag in x86-64 assembly, observing how a zero result sets the flag during operations like mov and sub, with rax and rbx in debug mode.
Explore the or instruction in x86-64 assembly, learn how it yields 1 for bit pairs and apply formats from register, memory, and immediate, with same-size and other usage rules.
Examine the xor instruction and its truth table, then apply formats such as xor dest, source with register or memory operands, noting size rules and that equal operands yield zero.
Explore how and, or, and xor instructions affect x86 flags, including sign and zero flags, and how they clear overflow and carry flags in common examples.
Learn how the test instruction uses two operands to set zero and sign flags without altering the destination, compare it with the and instruction, and bit testing al and bl.
Explore x86 64-bit conditional branch instructions and flag-based jumps. Understand JZ, JNZ, JC, JNC, JO, JNO, JS, and JNS for unsigned and signed comparisons.
Explore conditional branching with unsigned comparisons using the compare instruction and jump mnemonics like ja, jnbe, jae, jb, and jbe; see how flags determine branches.
Explore branching in x86-64 assembly by implementing a pre-test while loop and a post-test do-while loop, using labels, mov and cmp, and conditional jumps like jg and jle.
Improve efficiency in x86-64 assembly by moving data from memory into registers (rax, rbx), performing increments and comparisons in registers, and then writing results back to memory.
Master arrays in x86-64 assembly by examining continuous memory, same-type elements, and addressing by offset. Compare row-major and column-major two-dimensional arrays with practical address calculations.
Explore x86-64 addressing modes, including immediate, register, and direct addressing; understand offsets and array element access, and preview indirect addressing in the next lesson.
Explore x86 indirect addressing forms using base, index, scale, and displacement to access array elements. Demonstrate looping to print each quadword with rsi as the array address.
Explain endianness by contrasting little-endian memory order with big-endian networks, show how x86 stores least significant bytes first, and illustrate byte access with mov instructions.
Learn how the lea instruction calculates the address of a memory location and stores it in a register, with a sum variable and rax+10 arithmetic yielding 20.
Learn how rip-relative addressing forms addresses by adding a value to the rip register, using rel before variables, and setting default rel as the addressing mode.
Welcome to x86 64-bit Assembly Language from x-BIT Development.
This course is intended to teach you x86 64-bit assembly programming. It covers basics about computer architecture, data representation and low-level programming. In this course, we will take you through the step-by-step tutorials and teach you how to write assembly programs for x86 processors.
Each section contains:
engaging videos
downloadable resources
quizzes to test what you learned
In this course you will learn:
x86 assembly language from scratch
The general computer architecture
Data representation and counting systems
The fundamentals of the assembly language
x86-64 core instructions
x64 calling conventions
How to write assembly programs on x86-64 architecture
How to debug programs at the machine level