Assignment 10, due Nov 10
Part of
the homework for 22C:40, Fall 2003
|
Do Chapter 11 Problems a, d, f, h, m, p.
Note, there will be no homework due Nov 17!
Consider an abstract class of objects called frames. A frame is a generalization of the screen interface offered by the Hawk monitor. In the Hawk monitor, we have one frame, the whole screen, with operations dspat(), dspch() and dspst that set coordinates, relative to the origin of the display screen, and that display data on the screen, relative to the current coordinates. For MP3, you extended this by making putch() handle control characters relative to the origin defined by the most recent call to putat().
The following methods should apply to objects of the class frame, where the variables f and f' are handles on frame objects:
Note that there is a strong connection between this frames package and MP3! Feel free to reuse code from your solution to MP3 or to borrow code from the posted solution! Also note that the notes on object oriented design in Chapter 10 are very important.
For maximum credit, do not use the Hawk monitor, but implement your frames directly on top of the Hawk display screen interface. In addition, you must include a main program that tests your frames package. As usual, honest disclosure of known bugs in your code will be worth more credit than undisclosed or undiscovered shortcomings!
Turn in a well commented assembly listing that makes appropriate use of titles, subtitles etc. This must be printed in landscape format, with the assembler's number of lines per page set to the number of lines that actually fit on a landscape-format page, and with the font and tabs set properly so that the listing is legible! Also turn in a screenshot of the result of your test!
The following demo shows how to assemble and print in landscape format from a Linux computer in room 301 MLH.
smal -P 46 mp5.a lp -dp301 -o landscape mp5.a