Lecture 3 Flashcards
What 2 ways can translation be done?
– compilers, translating HLL instructions into machine code (sequence of instructions) – or, assemblers, translating mnemonic form of machine instructions (like MOV, ADD, etc) into their binary codes
what are modules
Big programs usually are divided into
several separate parts or modules
what are linkers
Each module has to be designed, coded and compiled and then all resulting binary parts are joined (linked) together by the linker
Role of a compiler
Take a program and translate it as a whole into machine
code
– The processes of translation and execution are separate
Role of an intepreter
Take an instruction at a time, determine its function,
then carry out those actions
– The processes of translation and execution are
interlaced
– No binary is generated
Advantages of Compilers
Execution of compiled code is much faster than
interpretation
Advantages of Intepreters
• Interpreters are more suitable for rapid prototyping
and for other situations when a program is
frequently modified
• Interpretation can make it easier to move
programs between platforms
• Interpreters may be easier to write than compilers
• Interpreted code is easier to debug