6.3 Types of Program Translator Flashcards
What must a program be translated to before being executed?
machine code
What are the three types of program translators ?
assemblers, compilers and interpreters.
What is an assembler ?
translates assembly language into machine code
Why might different assembler’s exist ?
platform specific -must exist for each different type of processor instruction set.
What is a compiler ?
Translates programs written in high-level languages into machine code
What are the characteristics of compilers ?
-Check for any errors and then translate the entire program at once
-If the source code
contains an error, it will not be translated.
-Compilers produce machine code, they
are said to be platform specific.
Does a compiled program require other software to be present?
No once translated
What is an interpreter ?
Translates high-level languages into machine code line-by-line
What are the characteristics of Interpreters ?
- Use procedures are used to translate each kind of program instruction.
-Check for errors as they go
What must happen when a program is translated by an interpreter and its result?
- Both the program source code and the
interpreter itself must be present - poor protection of the source code which make the original code difficult to extract.
What do some Compiler’s do with source code ?
translate into an intermediate language like bytecode
What are the benefits of using an intermediary language in a compiler ?
-Use a virtual machine to execute bytecode on different processors.
-. Each different processor instruction set will have its own VM
-platform independence.
What is source code ?
Name given to the input to a translator
What is the object code ?
A translator’s output is called object code and is produced from source code.