Reference no: EM132214062
Question :
Write a subroutine called PRUNE to search an array called raw_measurements that contains 16-bit unsigned integers and exclude the elements that are less than a given value called Min and the elements that are more than a given value called Max.
Store the remaining measurements in an array called pruned_measurements. The length of the array is variable and it ends with $FFFF.
Example: if raw_measurements = {255, 600, 9000, 0, 1700, 432, 8765, 50, $FFFF}, Max = 500, and Min = 60, pruned_measurements = {255, 432, $FFFF}.
The starting address of raw_measurements and pruned_measurements are passed by registers X and Y, respectively. Max and Min are two memory locations.