## Compiler

 1. Going from a source (text) file to something a computer can
    execute is a fairly complicated process. What we normally call a
    ‘compiler’ is, in fact a «driver»: a program that supervises the
    process.
 2. The commands ‹cc› and ‹gcc› actually invoke this driver.
 3. The usual steps the driver invokes are as follows:
    
    a. preprocessor: ‹cc -E›
    b. compiler proper: ‹cc -S›
       α. lexical and syntactical analysis
       β. semantic analysis and type checking
       γ. optimisation
       δ. assembly (machine code) generation
    c. assembler: ‹cc -c›
    d. linker: ‹cc›

 4. The commands in the parentheses above are how to invoke that
    particular stage. Let's try:
    
        $ cc -E -o hello.i hello.c
        $ micro hello.i

 5. The ‹.i› file contains the program after the first step of the
    compilation process.
 6. All «preprocessor directives» have been processed. Those are
    mainly ‹#include› but also ‹#if›/‹#else›/‹#endif› and ‹#define›
    macros.
 7. You can find our ‹main› function near the end of the ‹.i› file.
 8. Now try:
    
        $ cc -S hello.i
        $ micro hello.s

 9. And finally:
    
        $ cc -c hello.s
        $ objdump -r --disassemble hello.o

Let's move on to a slightly more interesting program.

    $ micro read.c

(As always, when I say ‹micro›, feel free to use ‹vim› instead.)
