L8:Flowcharting a program - PowerPoint PPT Presentation

About This Presentation
Title:

L8:Flowcharting a program

Description:

ECE 2560 L8:Flowcharting a program Department of Electrical and Computer Engineering The Ohio State University * ECE 3561 - Lecture 1 Flowcharting Where does ... – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 10
Provided by: JoanneE63
Category:

less

Transcript and Presenter's Notes

Title: L8:Flowcharting a program


1
L8Flowcharting a program
ECE 2560
  • Department of Electrical and
  • Computer Engineering
  • The Ohio State University

2
Flowcharting
  • Where does flowcharting come in?
  • Flowcharting symbols and examples
  • Flowcharting a program

3
What is flowcharting
  • Flowcharting is a method of documenting an
    algorithm or method for performing a sequence of
    actions.
  • Could be something that is not intended for a
    computer program.
  • Provides a graphical view of the process or
    method.
  • For assembler language can even indicate register
    and memory usage

4
Flowcharting symbols
  • Straight action (or code sequence)
  • Enclosed in a box sequence of code goes in the
    box.
  • Example exchange 2 items
  • A - -gt Temp
  • B - -gt A
  • Temp - -gt B

5
Flowcharting symbols
  • Decision structure
  • Example
  • dec I
  • jge yes
  • Code for false branch
  • jmp after
  • yes Code for true branch
  • after code that follows structure

6
Flowcharting loops
  • A for loop
  • For I 1 to 10 Loop
  • code in loop
  • End loop

7
Flowchart for a problem
  • We considered multiply routine (note different
    register numbers used here)
  • Note symbol for subroutine and enter/return

8
Other flowchart symbols
  • Have seem actions, decision, subprocess,
    enter/return
  • A couple of others that are often used

9
Flowchart hierarcy
  • Flowchart can be written such that what is in the
    action (process) box is a high level statement.
  • The high level statement can be a program in and
    of itself
  • OR
  • A flowchart can be done indicating assembler
    instructions and which registers are used.
Write a Comment
User Comments (0)
About PowerShow.com