Software Development

x86-64 Assembly Programming

Overview

This course is an introduction to assembly programming for the x86-64 architecture. Emphasis is placed on best, current practices and methods, including SIMD instructions. Students will write extensive code as part of the course to exercise their skills. Some work will be put toward basic reverse engineering.

Cumulative graded assessments available for group training.

Duration

40 hours

Who Should Take This Course

Audience

This course is suitable for developers or others with moderate experience in programming a compiled language, such as C, C++, Go, Rust, or Fortran. This course is not designed for students who are new to programming.

Prerequisites

Students should have some previous compiled programming experience, such Rust or Fortran, or completing our Intermediate C ProgrammingC++ Programming, or Go Programming classes. They should be able to write conditionals, loops, and functions, do some basic debugging, and write a simple program that makes use of these skills.

Why You Should Take This Course

Upon completion of this class, students will be able to the following:

  • Write x86-64 Assembly code: loops, conditionals, and functions.
  • Build and run x86-64 Assembly programs
  • Integrate with third-party libraries in other compiled languages
  • Create and call functions using the SysV ABI
  • Define and manipulate record types
  • Debug the behavior of a running program without debugging symbols
  • Profile and optimize x86-64 Assembly code
  • Reverse-engineer simple functions and programs

Course Outline

x86-64 Assembly Programming

  1. Introduction to x86

    • Why Learn Assembly?
    • Prerequisites
    • History
    • Terminology
    • Optimization & Intuition
  1. Executable Programs

    • End-to-end Process
    • Executable Formats
    • Sections
  1. Tools

    • hexdump or xxd
    • strings
    • nm
    • objdump
    • gdb
    • ltrace and strace
    • make
    • as
    • Almost Hello World
    • Hello World
  1. CPU

    • RISC Architecture
    • CISC Architecture
    • GPU
    • Pipelining
    • Modes
  1. Registers

    • Intel Architecture History
    • Register Descriptions
    • Callee-Saved Registers
  1. Memory and Latency

    • Structure
    • Memory Pages
    • Caches
    • Latency Numbers Every Programmer Should Know
  1. The Two Major Syntaxes

    • Intel
    • Arguments
    • AT&T
    • Comments
    • Directives
    • Macros
  1. Assignment

    • Indirect Addressing
    • Load Effective Address
    • Segment Offsets
    • RIP-Relative Addressing
    • Sign Extension
  1. Arithmetic

    • No Operation
    • Basic Operations
    • Bitwise Operators
  1. Floats

    • ST Use
    • XMM Use
  1. Conditionals

    • Condition Flags
    • Condition Codes
    • Jumps
    • Conditional Moves
    • Jump Tables
  1. Loops

    • Jump and Loop Optimizations
    • Loop instructions
  1. Functions

    • Stack Space
    • Base Pointer and Stack Pointer
    • Caller- and Callee-Saved Registers
    • x64 ABI
    • IA-32 ABI
    • Return Types
    • System Calls
  1. Strings

    • cld, std
    • lods, stos
    • scas
    • movs
    • cmps
    • rep, repz, repnz
  1. Signal and Interrupts

    • Interrupts
    • Signals
    • Exceptions
  1. SIMD

    • Concept
    • Packed Data
    • Instruction Set
Search UMBC Training Centers