Computer Architecture/컴퓨터구조[05]
[CA] Lecture #02
leziwn.cs
2023. 9. 8. 06:22
Ch 0: Computer Architecture
Compilation System
- Pre-Processor (cpp)
: Preprocessing phase --> Modifies the original C program according to directives that begin with "#" character.
- Ex) #include <stdio.h> - Compiler (cc1)
: Complication phase --> Translates the text file hello.i into the text file hello.s, which contains an assembly-language program.
**Assembly language is same. - Assembler (as)
: Assembly phase --> Translate hello.s into machine-language instructions, packages them in a form known as a relocatable object.
**Machine-language instructions = Binary - Linker (ld)
: Linking phase --> Handles merging and generate an executable object file.
Hardware Organization
- BUS
- I/O Devices
- Main Memory
- Processor (CPU)
Simple Operations
- Load: main memory --> register
- Store: register --> main memory
- Operate: Copy the contents of two registers to the ALU and perform an arithmetic operation on the two words, and store the result in a register, overwriting the previous contents of that register.
- Jump: Extract a word from the instruction itself and copy that word into the PC(Program Counter), overwriting the previous value of the PC.