HW5
Class 14:
- 4.36 (Write a MARIE subroutine...) 30 points
Class 16 (this homework question is not taken from the textbook --
label it as "class 16 homework" -- it's worth 30 points):
- Write a MARIE assembly language program with the following
properties. There is a location labelled N storing a
positive integer n. There is a label Array marking
the start of an array containing n integers. There is a
location labelled Value storing an integer
value. There is a label Answer that will store the
answer of the computation. The program must output (i.e. store in
Anwser) the number of elements of the array which are greater
than value. You may assume that Value and all
elements of the array are nonnegative. The program must use the
subroutine you wrote as the solution to the textbook exercise
4.36. Important hint: manipulating arrays in MARIE requires
some special tricks. Look carefully
at arrayDemo.zip in order to understand
the techniques you will need.
Total points on this assignment: 60