Computer Systems Programming
Computer Systems Programming ECE 209
Popular in Course
Popular in ELECTRICAL AND COMPUTER ENGINEERING
verified elite notetaker
This 5 page Class Notes was uploaded by Miracle Jaskolski on Thursday October 15, 2015. The Class Notes belongs to ECE 209 at North Carolina State University taught by Gregory Byrd in Fall. Since its upload, it has received 16 views. For similar materials see /class/223885/ece-209-north-carolina-state-university in ELECTRICAL AND COMPUTER ENGINEERING at North Carolina State University.
Reviews for Computer Systems Programming
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 10/15/15
ECE 209 Intflhi WELCOME 1 Course Objectives 0 Topics grading 0 Academic integrity HighLevel Languages 0 Compiler vs Interpreter 0 C vs Other languages Fall 2010 Introduction Objective Ability to write a nontrivial C program Topics C language features variables statements functions pointers Mapping of C to LC3 Assembly Language What s really happening in the computer What does a C statement do How can we write more efficient C programs Basic data structures Arrays Linked Lists Hash Tables Programming and Debugging Fall 2010 E C E Introduction 1 Read the syllabus 2 Components of grade Homework 20 Pro39rams 20 Problem Session 5 Insemester exams 15 15 Final exam 25 3 Academic Integrity Unless otherwise instructed in writinw all work is individual work Fall 2010 E C E Introduction A 5 Application Program Algorithms Software Lan 7 ua 7 e Ha39ampquotvi e 39 lnstruction Set Architecture and HG Interfaces Microarchitectu re Circuits Devices ECE 209 Fall 2010 Introduction What s a HighLevel Language Higher Layer of Abstraction 0 Separated from Machinelevel Details 0 May use natural language elements Easier to understand write debug Common Features Symbolic namesJ Wide variety of operators Structured control statements 0 Loops conditionals Modularity 0 Functions etc ECE 209 Fall 2010 Introduction Translating a HighLevel Program Interpreter Compiler Executes a program s statements Usually one statement at a time I Easy to debug observe make changes Examples BASIC Perl Java sort of Python Translates highlevel I rovram into an executable machine instructions Performs optimizations over multiple statements Change requires recompilation Harder to debug since program and executable are not the same Examples C C Fortran Java sort of Fall 2010 Introduction Consider the following algorithm Get W from the keyboard XWW YXX ZYY Print Z to screen If interpreting how many arithmetic operations occur If compiling we can analyze the entire program and possibly reduce the number of operations Can we simplify the above algorithm to use a single arithmetic operation ECE 209 Intilhi Steps for Writing a C Program Defineunderstand program objectives Specification document Consultation with client Design rogram Brain Flow chartpseudocode Design document Write source code Text editor Compile source code to create Compiler executable Linker IDE Run executable Loader NetBeans OSruntime system Eclipse Visual Studio Test and debug executable Debugger etc Testing framework Fall 2010 Introduction Compiling a C Program Preprocessor macro substitution conditional compilation sourcelevel transformations output is still C Compiler generates object file machine instructions Linker combine object files including libraries into executable image C Source and Header Files C Preprocessor Compiler Source Code Analysis Symbol Table Targel Code Synthesis ECE 209 Intilhi Inside the Compiler Source Code Analysis front end parses programs to identify its pieces variables expressions statements functions etc depends on language not on target machine Code Generation back end generates machine code from analyzed source may optimize machine code to make it run more efficiently very dependent on target macnlne Symbol Table map between symbollc names and ltems like assembler but more kinds of information