Assembly Language & Computer Architecture

Table of Contents

Assembly Language & Computer Architecture

Prev: bit-hacks Next: c-to-assembly

There are 4 stages to turn source code into a binary:

  1. Preprocessing (clang -E main.i)). This expands macros.
  2. Compiling (clang -S main.s)). This turns code into assembly.
  3. Assembling (clang -c main.o). This turns code into objects.
  4. Linking: (ld main). This creates the main executable.

Why look at assembly?

Your computer’s instruction set architecture (ISA) has four main concepts:

Prev: bit-hacks Next: c-to-assembly