Computer Organization - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Computer Organization

Description:

The piece you will be working on this week is parsing an arbitrary input string. ... AxxB 'AxxxxAxxxxA' 'A' Result. String to Parse. Delimiter String ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 8
Provided by: jb20
Category:

less

Transcript and Presenter's Notes

Title: Computer Organization


1
Computer Organization
  • Project 4
  • Prof. Jerry Breecher
  • CSCI 140
  • Spring 2003

2
What You Will Do In This Lab.
  • The purpose of this lab is to take the next steps
    in writing a more complex program.
  • You are working toward writing a program that can
    take in the following input
  • ADQltwsgtstring1ltwsgt.ltwsgtstringN
  • Where
  • ADQ means Sort in Ascending order, Descending
    order or Quit.
  • ltwsgt whitespace space or tab.
  • There is a considerable amount of work to do
    here, and so it makes sense to divide this into
    smaller pieces.
  • The piece you will be working on this week is
    parsing an arbitrary input string.

3
What You Will Do In This Lab.
  • So the interface for the next part of the
    assignment will look like this
  • Delimiter(s) CEF
  • String To Parse Now iCeciclEs Descend From thE
    sky
  • Result
  • Now i
  • ecicl
  • s Descend
  • rom th
  • sky
  • Delimiter(s)

The string of characters between each of the
delimiters is printed out.
4
What You Will Do In This Lab.
  • Groundrules
  • Credit for Projects
  • Is based on deliverables.
  • There will be no test plan for this project.
  • You will be expected to do a Show and Tell one
    week after the lab is assigned.
  • You will also be expected to turn in your
    assignment, placing it in the CS140 submissions
    directory. To do this, name your completed code
    as proj4.s, and then from the directory in which
    the code currently resides, type the following
  • jbreecher/turnin.pl 140 proj4.s

5
What You Will Do In This Lab.
  • look_for_delimiters
  • Writing the interfaces and specs for routines
    goes a long way toward breaking up the project.
    One way to do this is to define the routine
    look_for_delimiters with the following interface
  • look_for_delimiters
  • Inputs
  • a0 - contains the address of the
    delimiter string.
  • a1 - contains the address of the start
    of the string to be parsed.
  • The delimiter string has the following
    properties
  • lt0 or more characters that are
    delimitersgtltThe NL chargtlt0gt
  • The string to be parsed has the following
    properties
  • lt0 or more characters, some of which
    MAY be delimitersgtltThe NL chargtlt0gt

6
What You Will Do In This Lab.
  • look_for_delimiters
  • Heres the continuation of the interface spec.
  • Outputs
  • a0 (unmodified) - contains the address
    of the delimiter string.
  • a1 (unmodified) - contains the address
    of the start of the string that was parsed.
  • v0 - A pointer to the location in the
    parsed string where a delimiter was found.
  • v1 The delimiter character that was
    found.

7
A Test Plan
  • Here are some possible inputs that you can check
    for. I have attempted to give you some
    interesting and unusual conditions.
Write a Comment
User Comments (0)
About PowerShow.com