Machine Problem 2, due October 10

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

Concept:

Consider an array of 3-word records, where each record contains the following fields (presented in order):

The last record in the array contains a null pointer

The Assignment:

Given that the external symbol ARRAY is the address of the first word of the array, write a Hawk main program that displays all of the strings in the array on the screen, each string starting at coordinates <X,Y> on the screen. To access the array, you will need to include this text near the head of your program:

        EXT     ARRAY
PARRAY: W       ARRAY

The code to load the address of the array into a register will be similar to the code for loading the initial value of the stack pointer or for loading the address of a monitor routine.

You'll be calling the monitor routines DSPST and DSPAT to display the strings, and you will need to code a loop that terminates when it finds a record containing a null string pointer.

As with MP1, your assignment will be submitted using icon, and the main program should be in a file named mp2.a, with a title saying MP2 followed by your name name as it appears on your university ID card.

Grading

Your program will be assembled and the result linked to the test data. If the output is right, you will get half credit. The other half of the credit will be assigned based on the quality of your source file, including use of appropriate comments, formatting, and cleanliness of the code.