Compiling
For a few weeks now, we’ve dabbled in the process of writing simple source code and simple programs, and have brought those programs to life by way of typing make
. But what, exactly, does make
do? How does the arcane syntax of C get translated to the 0s and 1s that a computer understands? In the videos and resources presented in this section, David looks behind the curtain of make
to the underlying compiler, clang
, and demonstrates just how useful it is to have a program like make
to abstract away some of the details of how to create that mashup of 0s and 1s, possibly linking together your code with the code of others.
-
Lecture
-
Short
-
Notes
-
Supplementary Resources
- Ben Eater on Comparing C to Machine Language
-
Thought Questions
- If we have to go through all the trouble of this compilation process, why do we write in higher level languages like C?
- Why might people choose to write in assembly?
- Did you think that C’s toolkit was already pretty limited? What do you think about the size of that toolkit now that you know how limited the number of instructions there are in assembly language is?
- What are the advantages and disadvantages of writing in higher or lower level languages?
-
Problems