ee488_compiler_r3 - Northwestern Polytechnic University...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
N orthwestern P olytechnic U niversity EE488 Lecture Notes Compiler Basics
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
EE488 - NPU Lecture Goals 9 Understand the basic compiler process 9 Understand the difference between compiler and assembler 9 Understand PC Relative Addressing vs. absoulte addressing 9 Understand how a CPU views registers vs. Compiler and OS view of registers.
Background image of page 2
The Compiler A Brief Introduction
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
EE488 - NPU The Compiler (a brief introduction) We now know that before an instruction can be executed such as, C=A+B, the data values associated with A and B must be loaded into the CPUs registers. Which registers are available and how to manipulate them is the job of the compiler. The compiler is the program that converts the “text” based source code, created by the programmer, to the machine code format that the CPU understands. The compiler is responsible for keeping track and manipulating the CPUs registers. Compilers usually employ very sophisticated algorithms to get the CPU operating as efficiently as possible.
Background image of page 4
EE488 - NPU The Compiler (a brief introduction) Compiler High Level Language CPU Resources Registers and usage Instruction Formats Instruction Set
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
EE488 - NPU Translating and Starting a Program Compiler C program a=b+c; d=e-5; Assembly language add r1,r2,r3 subi r4,r5,0x5; Assembler Object modules Object Library routines Linker Executable Machine code Loader Memory
Background image of page 6
EE488 - NPU Translating and Starting a Program Compiler Converts high level language (HLL) into assembly format (a symbolic language). HLL code takes many fewer lines of code than assembly. HLL offers higher productivity.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 22

ee488_compiler_r3 - Northwestern Polytechnic University...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online