Machine Problem 4, due at the end of Oct 28
Part of
the homework for CS:2630, Fall 2019
|
Framework: Your program must begin and end as follows:
TITLE "mp4.a by Your Name Here USE "hawk.h" USE "stdio.h" USE "/mnt/nfs/clasnetappvm/fs3/dwjones/2630mp4.h" ... your code hre ... END
Obviously, where it says Your Name Here put your name, and where it says ... your code here ... put SMAL Hawk code to solve the problem.
Details: The last header file mentioned above, ...2630mp4.h defines the following symbols:
The data structure for the array is in RAM, while the strings are in read-only memory, so your program may not modify the strings.
Your job is to write two subroutines:
Grading: 5 points. Correct output is worth 2.5 points. The remaining credit will be offered only for those who have at least partially correct output.
Code that does not assemble will not earn any credit.
Stylistically clean code is important; that is why half the credit is reserved for style, but only if the code works. Bad indenting will be penalized up to 1 point from the 2.5 style points. Excessive or inadequate white space within and between lines will be penalized, again, up to 1 point. Excessive or inadequate comments will be judged similarly.
Note: Comments should not repeat the assignment. Assume that the reader of your code has read the assignment. Assume that the reader knows how to program, so commenting ADDSI R1,1 with R1=R1+1 would be stupid. Comments should help the reader when the code is hard to follow.
Before you submit: Assuming your code is in a file named mp2.a, please use the command
[HawkID@fastx?? ~]$ ~dwjones/format mp2.a
This will gripe about over-length lines, strange mixing of tabs and spaces, and other file-format issues that will make your code hard to read when printed out for grading but might not be obvious when you have the file open for editing.
Submission: To submit your work, it must be in a file named mp3.a in your current directory on the CLAS Linux system, and you must know your section number. In the following transcript of a submission, what you type is shown in bold face.
[HawkID@fastx?? ~]$ submit mp4.a Course (for CS:1210 use CS1210): CS2630 Possible submit directories for /group/submit/CS2630 are: mp4/a3 mp4/a2 mp4/a4 mp4/b11 mp4/b12 mp4/b13 Choice: mp4/a2 * File/directory mp4.a has been * copied to /group/submit/CS2820/mp4/a2/mp4.a.HawkID. [HawkID@fastx?? ~]$
The output saying "File ... has been copied ..." is your confirmation of successful submission. In the event of insurmountable trouble, do not delete or edit files you have submitted. Keep them around. It is safe to make copies if you want to keep playing with them. Keep the original on the CLAS Linux system until your graded work is returned. This way, the time stamp marking the time of last edit is a trustworthy indicator of whether you did the work on time.