Compilers

Compilers - Assembler - Asm -> Machine code...

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

View Full Document Right Arrow Icon
    Compilers
Background image of page 1

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

View Full DocumentRight Arrow Icon
    compiler  is a  computer program  that  translates a computer program written  in one  computer language  (called the  source language ) into a program written  in another computer language (called  the output or the  target language ). 
Background image of page 2
    Most compilers translate  source code   written in a  high level language  to  object  code  or  machine language  that may be  directly executed by a computer or a  virtual machine
Background image of page 3

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

View Full DocumentRight Arrow Icon
    Compilers and Interpreters Compilers and interpreters translate  high-level languages, such as C, into  machine language (they are programs  themselves!). example.c gcc (C compiler) example.o source file object file ln (linker) executable file other library files example example.exe
Background image of page 4
    Starting a Program The 4 stages that take a C++ program (or any  high-level programming language) and  execute it in internal memory are: Compiler  -  C++  ->  Assembly code
Background image of page 5

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

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Assembler - Asm -> Machine code (object) Linker -Object -> Executable Loader - Executable -> Execution in Memory Translation Hierarchy ( ) Assembler Assembly language program Compiler C program Linker Executable: Machine language program Loader Memory Object: Machine language module Object: Library routine (machine language) Types of compilers A compiler may produce code intended to run on the same type of computer and operating system (" platform ") as the compiler itself runs on. This is sometimes called a native-code compiler. Alternatively, it might produce code designed to run on a different platform. This is known as a cross compiler ....
View Full Document

Page1 / 7

Compilers - Assembler - Asm -> Machine code...

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

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