이제 본격적으로 기계가 어떻게 c언어 코드를 해석하는지에 대해서 살펴보자

  1. Definitions

Architecture: assembly, machine code를 쓰거나 이해하기 위해 만든 프로세스 디자인 파트 Ex)registers, instruction set spedcification

Microacrhitecture: Architecture의 구현

Machine code: byte-level programs

Assembly code: A text representation of machine code

1.PNG

  1. Compiling with assembly

Code in files p1.c p2.c가 있다고 하자.

Command로 compile 하는 법

gcc -Og p1.c p2.c -o p (g++이면 c++용)

gcc -Og -S p1.c : code를 assembly어로 바꾼다.