2.4 Translators and Facilities of Languages Flashcards
What are assemblers responsible for?
Converting low-level assembly language into machine code.
How do assemblers have a one to one relationship?
Each line of assembly code is converted or looked up by the assembler and translates directly into one line of binary.
Why are assemblers processor specific?
Each CPU has a unique set of instructions for itself, which won’t work on other CPU’s
Define translator
Any program which converts source code (code written in a programming language) into the machine code (binary).
What are compilers and interpreters responsible for?
Converting high-level languages into binary.
How do compilers and interpreters have a one to many relationship?
Each single line of high level source code written by a programmer translates into many lines of binary.
How do interpreters translate a high level language?
They take one line of high language program code and convert it directly into binary and then run it
Why are interpreters useful when debugging a program?
Because they will stop at the first line which contains an error.
What is a disadvantage of interpreters debugging a program?
The interpreter will require access to the whole source code each time it needs to translate it.
How are interpreters debugging a program inefficient?
It’s a security issue, the code can be stolen.
The code executes quite slowly, especially for large programs.
How do compilers translate a high level language?
They take the entire program and converts it into object code which can be quite slow.
Why can a compiler be better than an interpreter?
The compiled object code will run a lot faster than an interpreted version.
Why can an interpreter be better than a compiler?
f the program needs to be updated now, the original source code would have to be changed and a new version compiled and distributed.
What is an integrated development environment (IDE)?
A program which provides resources and tools with high level languages.
What are some included tools?
Multi-window text editing.
Run Time Environment.
Built-in translator.
Integrated debugger.