CPSC 2310 - DAY 23 OCTOBER 28, 2016 ================================================================================ Syntactic Analysis builds a parse tree determines meaning This then will generate intermediate code They will then optimize the code (machine-independent optimization) MACRO PROCESSOR --------------- simple abstraction through textual substitution ("open subroutines") provides either keyword or positional parameter substitution extends instruction set by synthesizing instructions using macro definitions ex: square (x+1) will mean x+1*x+1 have to write parenthesis so it knows what to do. They are textual substitution, no interpretation. expands macro at assembly time, not at runtime They expand the code in place so there is less overhead linker combines seperate object files into a single executable .layout pieces of code and data (storage allocation based on sizes) .resolve external references .perform relocation of absolute addresses loader brings a program into memory in preperation for execution read file header to find size of pieces allocate memory areas read instructions and data from file into memory relocation (adjusting absolute addresses relative to load point jump to startup code