Exercise #4
(20 Oct 2005)
The file rev-template.s contains part of a program that prompts the user for a count, then uses that count to reverse the order of some of the elements in an array of word values. There are 20 numbers in the array. For example, when a count, such as 8, is entered, the program should call a procedure named reverse to reverse the order of the first 8 numbers in the array. After the reversal, the program displays the 20 numbers to verify that the reversal has occurred. You can get a copy of rev-template.s from the Z: drive at z:\jlwolfe\cosc300 it is also on the back of this page.
You are to write the reverse procedure and the call to the procedure. All other parts of the program are already in rev-template.s Change the name of the file to your name and when you have the program working, copy it to the z:\jlwolfe\cosc300\ex4 folder on the Z: drive.
Each of you needs to submit your own program;
however, you are allowed to discuss the program's creation with other students
or with me. And you may ask any questions that you need to.