Chapter 6 Programming l Problem solving l Debugging.

Slides:



Advertisements
Similar presentations
Chapter 15 Debugging. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Debugging with High Level Languages.
Advertisements

Analysis of Algorithms CS 477/677
The LC-3 – Chapter 6 COMP 2620 Dr. James Money COMP
PART 6 Programming 1.Decomposition 2.Three Constructs 3.Counting Example 4.Debugging.
Slide 1CPU Emulator Tutorial This program is part of the software suite that accompanies the book The Digital Core, by Noam Nisan and Shimon Schocken 2003,
The LC-3 – Chapter 6 COMP 2620 Dr. James Money COMP
Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
Overview of Computers & Programming Languages Chapter 1.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Programming and Problem Solving
Chapter 4 H1 Assembly Language: Part 2. Direct instruction Contains the absolute address of the memory location it accesses. ld instruction:
+ CS 325: CS Hardware and Software Organization and Architecture Integers and Arithmetic Part 4.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Final Exam Review Instructor : Yuan Long CSC2010 Introduction to Computer Science Apr. 23, 2013.
April 14, 2007CCSC-Central Plains Region1 Use of a Simulator and an Assembler in Teaching Input-Output Processing and Interrupt Handling Soe Than Department.
Chapter 8 Input/Output l I/O basics l Keyboard input l Monitor output l Interrupt driven I/O l DMA.
COMPUTER ORGANIZATION CSCE 230 Final Project. OVERVIEW  Implemented RISC processor  VHDL  Test program created to demonstrate abilities.
Chapter 7 LC-3 Assembly Language. 2 College of Charleston, School of Science and Mathematics Dr. Anderson, Computer Science CS 250 Comp. Org. & Assembly.
1 College of Charleston, School of Science & Mathematics Dr. Anderson, Computer Science Department CS 250 Comp. Org. & Assembly CS 250 – Computer Organization.
Introduction to Programming. What is a Program  Set of Instructions that tells the computer what to Do.  Driving force behind the computer  Without.
Overview of Computing. Computer Science What is computer science? The systematic study of computing systems and computation. Contains theories for understanding.
First Programming Assignment For MIPS R3000 Processor Department of Computer Science Southern Illinois University Edwardsville Fall, 2015 Dr. Hiroshi Fujinoki.
Vintage Computer Hardware 101 Featuring the MITS Altair 680b Bill Degnan.
Lecturer: Dr. AJ Bieszczad Chapter 11 COMP 150: Introduction to Object-Oriented Programming 11-1 l Basics of Recursion l Programming with Recursion Recursion.
Chapter 4 - Implementing Standard Program Structures in 8086 Assembly Language from Microprocessors and Interfacing by Douglas Hall.
The von Neumann Model – Chapter 4
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin.
CS 170 – INTRO TO SCIENTIFIC AND ENGINEERING PROGRAMMING.
Chapter 9 Chapter 9 Subroutines and TRAPs l Privileged Instructions l TRAP Routines l Subroutines.
Chapter Algorithms 3.2 The Growth of Functions 3.3 Complexity of Algorithms 3.4 The Integers and Division 3.5 Primes and Greatest Common Divisors.
1 Section 2.1 Algorithms. 2 Algorithm A finite set of precise instructions for performing a computation or for solving a problem.
The basics of the programming process The development of programming languages to improve software development Programming languages that the average user.
An Example Architecture. A Paper Computer - Woody Woody's characteristics Word size – 8 bits One word.
1 09/27/04CS150 Introduction to Computer Science 1 Let ’ s all Repeat Together.
Chapter 6 Programming. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 6-2 Solving Problems using a Computer.
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin.
Flowcharts C++ Lab. Algorithm An informal definition of an algorithm is: a step-by-step method for solving a problem or doing a task. Input data A step-by-step.
Introduction to Computing Systems and Programming Programming.
The LC-3 – Chapter 6 COMP 2620 Dr. James Money COMP
Writing an Assembly-language program MIPS assembly language using MARS: MIPS Assembler and Runtime Simulator CS-2710 Dr. Mark L. Hornick 1.
Number Systems Decimal Can you write 12,045 in expanded form? Base? Allowable digits for each place?
Chapter 6 Programming Adapted from slides provided by McGraw-Hill Companies Inc., modified by professors at University of Wisconsin-Madison.
CS 286 Computer Organization and Architecture
Introduction to Computer Engineering
Overview of Computers & Programming Languages
Foundations of Computer Science
Software Programming J. Holvikivi 2014.
Lecture 2 Introduction to Computer Science (continued)
Unit# 9: Computer Program Development
Programming Problem solving Debugging
Chapter 6 Programming.
Algorithm An algorithm is a finite set of steps required to solve a problem. An algorithm must have following properties: Input: An algorithm must have.
CSC Classes Required for TCC CS Degree
Introduction to Computer Engineering
CPU Emulator Tutorial This program is part of the software suite
Chapter 6 Programming.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 17: Recursion.
Introduction to Computer Engineering
CNET 315 Microprocessor & Assembly Language
CS-401 Assembly Language Programming
CS 286 Computer Organization and Architecture
October 29 Review for 2nd Exam Ask Questions! 4/26/2019
Introduction to Computer Science
Basic Concepts of Algorithm
COSC121: Computer Systems
Introduction to Computer Engineering
Introduction to Computer Engineering
Introduction to Computer Engineering
Introduction to Computer Engineering
Chapter 6 Programming.
Presentation transcript:

Chapter 6 Programming l Problem solving l Debugging

2 College of Charleston, School of Science and Math Dr. Anderson, Computer Science CS 250 Comp. Org. & Assembly Problem solving l Start with systematic decomposition of problem –“top-down” analysis –stepwise refinement l Algorithms must have properties of: –finiteness –definiteness –computability

3 College of Charleston, School of Science and Math Dr. Anderson, Computer Science CS 250 Comp. Org. & Assembly Structured programming l Three control structures: –Sequential l This is the default –Conditional l Branching or decision-making –Iteration l Loops

4 College of Charleston, School of Science and Math Dr. Anderson, Computer Science CS 250 Comp. Org. & Assembly Implementing the control structures Sequential Conditional Iterative

5 College of Charleston, School of Science and Math Dr. Anderson, Computer Science CS 250 Comp. Org. & Assembly Stepwise refinement illustrated

6 College of Charleston, School of Science and Math Dr. Anderson, Computer Science CS 250 Comp. Org. & Assembly Stepwise refinement Stepwise refinement –Final level

7 College of Charleston, School of Science and Math Dr. Anderson, Computer Science CS 250 Comp. Org. & Assembly Debugging l A debugging tool provides (at least) the ability to: – Set values to registers & memory locations l enter as hex, decimal or binary values – Execute instructions one at a time, or in small groups l Run will set the program running l Step causes a fixed number of instructions to be executed (often used to “single-step” through part of a program) – Stop execution when desired l Breakpoints allow the user to set points at which execution will halt & wait for a new “Run” instruction – Examine the contents of registers and memory locations at any point

8 College of Charleston, School of Science and Math Dr. Anderson, Computer Science CS 250 Comp. Org. & Assembly Debugging example l A program to find the first 1 in a 16-bit word