Assignment 6, due Oct 15

Part of the homework for 22C:40, Fall 2003
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

Public Notice

Accenture Corp. has told the career center that it is especially interested in interviewing CS students for entry-level positions during their upcoming campus visit on Oct. 20-21. Interested students should submit electronic resumes through the Career Center. Resumes must be submitted by October 16. From discussions with company reps, it appears that Accenture some unusually interesting opportunities for CS students.

Machine Problem III Due Oct. 22

Many students were annoyed that the dspst() monitor routine did not understand any ASCII control characters. For this assignment, you will write three new display management routines, putat(), putch() and putstr() that have user interfaces identical to corresponding dspat(), dspch() and dspst() routines in the Hawk monitor, except that they understand the following control characters within the text being displayed:

The margin and tab stops are set by the x coordinate used in the most recent call to putat(). The x coordinate itself is the margin, and tab stops are set every 8 spaces.

Suggestion: putat() will have to save a copy of the coordinates you gave it, and putch() will have track the current coordinates, calling dspat() when needed to carry out the effects required for CR, LF and HT. putstr(), of course, should call putch() for each character in the string, so putch() will do all the hard work.

Suggestion: You can use a COMMON block to hold the global information that is private to your PUT routines. You can use the way the stack was declared in the Hello World program as a model for how to declare and access such a named block of RAM.

Requirement: Write a main program that tests your code thoroughly but concisely, with comments that indicate the purpose of each test.

Turn In: An appropriately commented and legible assembly listing of your code. Listings of the source file will not be accepted! The title in the listing must include your name and the fact that this is MP3. The listing must be subtitled for each subroutine and for the main program, and all known deficiencies and problems must be documented in the comments.

Homework Due Oct 15

Do Chapter 7 Problems c, d, g, j, and l.

In planning for MP3, exactly what global variables must be saved by putat(), and how does putch() change these when it outputs a single printable character, when it outputs a LF, and when it outputs a CR?

In planning for MP3, given that x is the current horizontal position, relative to the margin, can you give a simple mathematical formula for computing the horizontal coordinate of the next tab stop? (There is one, but if you can't figure it out, can you give an algorithm for computing the horizontal coordinate of the next tab stop.)