Lecture 2 Flashcards
Is assembly considered low level?
Due to the one-to-one correspondence with machine instructions, it is seen as low-level.
Is assembly portable?
No. different processors have different instruction sets.
What are some advantages of higher-level languages.
One HLL statement can correspond to many machine instructions.
They are also machine-agnostic, making them much more portable.
What does the operating system do?
As the name implies, it controls the entire operation of the computer. It is a resource manager and allocator.
All I/O operations performed on a computer system pass through the OS via a standardized interface.
It manages H/W resources and handles the execution of programs/processes.
Linux is _____-based.
Unix
Mac OS X is ______-based.
Unix.
What is a big reason for the success of Unix?
It was written primarily in C and made very few assumptions about the architecture of the computer.
This let it port to many different computers with relatively little effort.
Windows runs on…
Intel or intel compatible processors.
Compilers…
Translate a program in a high-level language into an executable for your operating system.
This involves many stages, and is not to be confused with compiling. Compiling is only one of the stages.
Compiler steps:
Source code
Preprocessor makes it into expanded code.
Compiler makes it into assembly code.
Assembler makes it into object code.
The linker takes the object code, libraries, and other object files, and makes it into executable code.
What are two popular text editors used on Unix?
vim/Emacs
What is gcc?
Uses the GNU C compiler.
Preprocessor
Takes symbol definitions and expands them. Inserts head file text to make a complete program.
Compiler
A syntactically correct program is translated into a “lower” form. Each statement is translated by the compiler into equivalent assembly statements. This is a .s file.
Assembler.
Translated assembly language into actual machine instructions. Object code or .o files.