Creado por Tyrone Muriithi
hace casi 9 años
|
||
Pregunta | Respuesta |
What is a translator | A program that converts source code into machine code |
What is a mnemonic | A memory device; something that makes difficult things easier to remember |
What is an assembler | A program that converts assembly language into object |
What is an interpreter | A program that converts high-level language into machine code and runs it line by line |
Advantage of an interpreter | Useful for debugging a program ca start running straight away and will stop at a line if it finds an error |
Disadvantage of a interpreter | An interpreted program runs slowly. Every time the program is run, the user has to wait for translation of each line as well as the execution |
What is a compiler | A program that takes a program written in a high-level language and converts it to object code |
Advantages of a compiled program | -Much faster than an interpreted program -Reduces risk of plagiarism because compiled code is not human-readable |
What are the 4 stages of compilation | 1)Lexical Analysis 2)Syntax Analysis 3)Code Generation 4)Optimisation |
What is involved within the first stage of compilation | -All comments and whitespace are removed from the program -High-level code is turned into a series of tokens |
What is a reserved word | A word that has a special meaning in the programming language and as such cannot be used as a variable name. Examples in many languages include if, else, while and for |
What is involved in the second stage of compilation | The compiler checks that the code that has been written uses a valid syntax This stage will also produce an abstract syntax tree from the tokens that will represent the program |
What is involved in the third stage of compilation | The compiler converts the abstract syntax tree into object code |
What is involved in the fourth stage of compilation | This stage involves improving the code to make it run as quickly as possible or with using as little memory as possible |
How is the code changed in the fourth stage of compilation | If the optimiser finds lines of code which have no effect on the program, they are removed It can also replace instructions or groups of instructions with better alternatives |
What is a library | A collection of precompiled routines that a program can use |
Examples of libraries | OpenGL, OpenSSL and Havok |
What is a linker | A program that combines library code with the compiled code to produce a final single executable program |
What is Static Linking | All the library code needed is put directly into the program when it is compiled. This means that the final program can be large in size |
What is Dynamic learning | When compiled versions of the library are stored and the operating system links a program to them when it is run |
What is a loader | A part of the operating system that is responsible for loading a program into memory |
¿Quieres crear tus propias Fichas gratiscon GoConqr? Más información.