1. What is an operating system?
The operating system is a series of software, is the program. We can understand the operating system like this, we operate the computer similar to the operation of the car, our car has body, power system, braking system, steering system and so on, I drive the car is not directly to operate the specific hardware, such as we want to turn the time is not their own direct final control steering wheel, Instead, it is controlled by the steering wheel provided by the car's operating system, where the car: The steering system provides the user with an interface: the steering wheel. The same power system provides the driver with: throttle interface, we can not directly push forward. Control the computer with the steering wheel, brakes, throttle, etc. provided by the car system. This control is safer, more precise, more efficient and more stable. Subsystems together are a complete car to get the operating system. The operating system is also the case, some of the program in charge of different hardware, composed of some small subsystems, and finally composed of computer systems.
2. Computer language History
Objective Concept Machine Language C language
Addition 1001,0001 Add +
Subtraction 1001,0010 Sub-
3. Architecture of the computer
First Layer: Application layer
Second layer: Operating system layer
Layer Three: Hardware physical layer
4. Procedure from source code to executable program
1. Pre-compilation
GCC-E Hello.c-o hello.i
CPP-E Hello.c-o hello.i//GCC integrated with the preprocessor CPP
In the C language program, all start with # are pre-processing instructions, which are given to the CPP preprocessing software. and remove the comment
GCC-E hello.c-o hello.i-v//Parameter-V shows the process of compiling
2. Compiling
Translate the HELLO.I compilation into a compilation Hello.s
At/T compilation Linux
X86 compilation
Gcc-s Hello.i-o Hello.s
3. Compilation
Translating assembly files into machine language is called assembly hello.o object file
Gcc-c Hello.s-o hello.o
4. Links
Run-time files, library files, startup code links link
GCC hello.o
Link the target file and the run-time file, the library file, to form an executable file.
5. HELLO.C source program hello.i preprocessed file Hello.s assembly language file hello.o target file, binary file
GCC Common Parameters-e preprocessing-s compiled to assembly language-C compile to the target file-o output file-v display the entire compilation process information
6. The above process is just a basic framework, there are links to the process of loading.
Fundamentals of Linux C programming