Assignment title: Management
Sequential Search
Write an assembly procedure to carry out a sequential search on a double-word array. The procedure
should accept the following parameters:
• ESI – The base address of the array to be search.
• EAX – The target value for the search.
• ECX – The length of the array.
The function should return the following:
• EDI – The address of the array element in which the target value was found. If the target value
was not found, return the address of the double-word that immediately follows the last element
of the array.
• ECX – The position (array-based index) in which the target value was found. If the target value
was not found, return the original length of the array that was given.
In addition, if the target was found, the procedure should set the Zero Flag. If not found, the Zero Flag
should be clear.
Also include a test program that demonstrates that the function works. The test program should output
all values in the test array, prompt for a target value, then display either the array position in which the
target value was found, or a message saying that the value was not found.