Do the Even questions from section 9.5.3.
(It wouldn't hurt if you studied the answers to the odd questions as
well.)
In addition, do these problems:
- Locate all instructions in the binary search implementation (before #8 is
applied) that can be removed to avoid redundant register loading.
- Generalize the PrintArray PROC to accept strings for printing before the
array data begins, between the array's elements, and after the array data
is done --- in addition to the array and length. (Wouldn't it be cool if
you could have these default to the author's choice of 'nothing', 'comma',
and 'nothing', respectively? *wow*)
- What changes would be needed to adjust the binary search to search through
an array of (ordered) strings?
- Could you write a single binary search PROC
that handled arrays which were ordered in either direction? If so, how?
If not, why not?
This assignment is Level 3.