2008SpCS61C-L18-ddg-runprogI

2008SpCS61C-L18-ddg-runprogI - UCB CS61C : M achine...

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

View Full Document Right Arrow Icon
CS61C L18 Running a Program I (1) Garcia, Spring 2008 © Click to edit Master subtitle style inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Lecture 18 – Running a Program I (Compiling, Assembling, Linking, Loading) 2008-03-04 Tiny etch-a-sketch Researchers at the University of Pittsburgh have used an atomic force microscope (AFM) to draw tiny, electrically conductive paths (ala wires) on a special material. The lines were as thin as 3 nm, making this one of the most precise techniques for etching devices out Lecturer SOE Dan Garcia www.technologyreview.com/Nanotech/20362/
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS61C L18 Running a Program I (2) Garcia, Spring 2008 © George A. Badgley, 1909-2008
Background image of page 2
CS61C L18 Running a Program I (3) Garcia, Spring 2008 © Disassembly is simple and starts by decoding opcode field. Be creative, efficient when authoring C Assembler expands real instruction set (TAL) with pseudoinstructions (MAL) Only TAL can be converted to raw binary Assembler’s job to do conversion Assembler uses reserved register $at MAL makes it much easier to write MIPS Review
Background image of page 3

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

View Full DocumentRight Arrow Icon
CS61C L18 Running a Program I (4) Garcia, Spring 2008 © Interpretation vs Translation Translating C Programs C ompiler A ssembler L inker (next time) L oader (next time) An Example (next time) Overview
Background image of page 4
CS61C L18 Running a Program I (5) Garcia, Spring 2008 © Language Execution Continuum An Interpreter is a program that executes other programs. Language translation gives us another option. In general, we interpret a high level language when efficiency is not critical and translate to a lower level language to up performance Easy to program Inefficient to interpret Efficient to interpret Difficult to program Scheme Java C++ C Assembl y machine language Java bytecode
Background image of page 5

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

View Full DocumentRight Arrow Icon
CS61C L18 Running a Program I (6) Garcia, Spring 2008 © Interpretation vs Translation How do we run a program written in a source language? Interpreter : Directly executes a program in the source language Translator : Converts a program from the source language to an equivalent program in another language For example, consider a Scheme program foo.scm
Background image of page 6
CS61C L18 Running a Program I (7) Garcia, Spring 2008 © Interpretation Scheme Interpreter is just a program that reads a scheme program and performs the functions of that scheme program.
Background image of page 7

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

View Full DocumentRight Arrow Icon
CS61C L18 Running a Program I (8) Garcia, Spring 2008 © Translation Scheme Compiler is a translator from Scheme to machine language. The processor is a hardware interpeter of machine language.
Background image of page 8
CS61C L18 Running a Program I (9) Garcia, Spring 2008 © Interpretation Any good reason to interpret machine language in software? SPIM – useful for learning / debugging
Background image of page 9

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

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

Page1 / 33

2008SpCS61C-L18-ddg-runprogI - UCB CS61C : M achine...

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

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