Important pre-reading

How Does C Code Run?

  1. The compiler turns C code into assembly code.
  2. The assembler converts assembly code into machine code.
  3. The Linker takes required libraries and adds it to a single final executable.
  4. The loader sets up Address Space in memory and loads the first instruction into memory.
  5. The CPU interprets the instructions, with %eip doing the job of the PC - Program Counter in MIPS.