Assignment 8

Due at 12 noon, on Friday, November 4, 1994

Grader: Sriram Narasimhan

Purpose

The purpose of this assignment is to write a simple MAL program.

Problem

The MAL program reads in a user entered string, prints it out in reverse order and calculates and prints the string length. A linefeed ' \n' character terminates the string and is not counted as part of the string length. Sample runs of the program might look like:

	Enter a string  : abcde
	Reversed string : edcba
	String length   : 5

	Enter a string  : 9 3 zzz
	Reversed string : zzz 3 9
	String length   : 7

	Enter a string  : one two three four
	Reversed string : ruof eerht owt eno
	String length   : 18

Requirements

The following requirements must be followed to receive full credit for the assignment.

What simulator to use and How to use it

For this and all subsequent assignments, you should use the graphical interface of the simulator sim instead of simp . The usage is similar to that of simp except that you have to use it as

	 sim filename 
where filename is the source file.

Further information about this simulator can be accessed through the CS354 Mosaic Home page.

How to turn in your assignment

You are to turn in the source code for your program by using the handin8 program. Make sure that you enter your full name, UW ID # and Instructor's name in the code that you turn in. When you have completed the assignment, hand in your source code by typing:

~cs354-1/bin/handin8 filename

where filename is the file containing the source code.