lecture 8 Flashcards
GNU Compiler Collection (GCC) : Compile, Assemble, Machine Language
3 compilation steps
- compiler
- assembler
- linker
what enters the compiler?
filename.c –> your program in high level language (text)
what is the gcc compiler command?
gcc -s filename.c
what does the gcc -s filename.c create?
when this is entered into the terminal and completes, an assembly program is created (filename.c –> filename.s)
what does the compiler change your program to?
filename.s –> assembler program
what is the .s/assembler program?
set of text instructions used to program the processor
what enters the assembler?
filename.s (assembly program)
what is the gcc command for the assembler?
gcc -c filename.s
what does the gcc -c filename.s create?
filename.o –> object program/machine program (binary)
what is the .o/object program?
machine program –> set of binary instructions that configure and control hardware
what enters the linker?
filename.o –> machine program (binary)
what is the gcc command for the linker?
gcc filename.o
what does the gcc filename.o create?
executable program (a.out)
who is the intended user for the machine program?
hardware (computer)
highest level language
highest level of abstraction, closest to human language, java python etc
your code basically
text
assembly language
lowest level of abstraction, specific to processor architecture (RISC CISC), syntax is human readable but language of machine
text
machine language
no abstraction, not human readable, syntax is binary encoded instructions and data, configure and control hardware (MIPS, processor, specific)
binary
instruction set architecture
combines instructions with registers, addressing modes, data types