CPS 104 (Ramm) Fall Semester 1995 Homework Assignment #1 Due Friday, Sep. 8 This assignment should be done by hand. You may turn in a handwritten paper version or e-mail me a version created with an editor. The notes on the hypothetical machine discussed in class include two simple programs. Modify the second (looping) program to alternately add and subtract items in a list of numbers (i.e. add, the first, subtract the second add the third, subtract the fourth, etc.). Have the program quit on encountering a 0 in the data rather than using a count. Double the length of the list of numbers to be used. Make up your own test data. Write a revised program listing with machine language, just like the handout. Do a trace similar to the other handout. However, take it through the loop only twice. Optional Propose a mechanism for implementing subroutines. Do so without requiring any new hardware. (This may require some fairly awkward conventions.) Notes on Homework Programs should include comments at the beginning that include your name and the date that the program was completed. There should be a comment describing, briefly, what the program is supposed to do. August 31, 1995