Important pre-reading
It’s important to read up on OS Memory Management (x86), (MIPS) Assembly Language The Stack’s Use in MIPS, C (Programming Language)
How Does C Code Run?
- The compiler turns C code into assembly code.
- The assembler converts assembly code into machine code.
- The Linker takes required libraries and adds it to a single final executable.
- The loader sets up Address Space in memory and loads the first instruction into memory.
- The CPU interprets the instructions, with
%eip
doing the job of thePC - Program Counter
in MIPS.