CMIS 310 8086 Homework Due: 4 Oct Put lots of meanigful comments in these programs. 1. Write a Micro86 8086 program that does binary search of a sorted array of bytes. Have the size of the array, the search value and the array data be DB's at the start of the program. The array must have at least ten values in it. Upon successful search (i.e. the search value is in the array), put 1 in AX. If unsuccessful search (serach value is not in the array), put 0 in AX. C-ish code: int A[N]={2, 5, 6, 8, 8, 10, 14, 21, 24, 25, 30, 33, 34}; //example sorted data int val=x; //search value int i=0, j=N-1; //i is left index, j is right index int mid=(i+j)/2; //midpoint index while (i<=j && val!=A[mid]) { //haven't searched all array and this middle value isn't the val if (val < A[mid]) //continue search in left half j = mid - 1; else //continue search in right half i = mid + 1; mid = (i+j) / 2; //middle of this half } if (i<=j) found it else not in the array 2. Write a Micro86 8086 program that creates a (crude) musical keyboard. The eight keys of the home row will play an ascending range of tones. The space bar will turn off the sound. Once a key is pressed, the associated tone will continue to play until another valid key is pressed. Display the currently played keyboard letter in the LED79. Example, if d was the last key pressed (and the speaker is thus outputting the associated tone), a 'd' 7seg value should be entered into the LED79. The oscilloscope should display a voltage that is proportional to the tone being played. Example, if d is the currently played tone, the oscilloscope should be at roughly 3/8 the height. When no tone is being played the voltage should be at 0. Build this incrementally. First just get a single input and output a tone. Then add the other keys and their tones (think: C switch statement, switching on the inputted char). Then add the LED and then the oscilloscope.