Question: Write a procedure named Str _ find that searches for the first matching occurrence of a source string inside a target stringa nd returns the
Write a procedure named Strfind that searches for the first matching occurrence of a source string inside a target stringa nd returns the matching position. The input parameters should be a pointer to the source string and a point to the target string. If a match is found, the procedure sets the Zero flag and EAX points to the matching position in the target string. Otherwise, the Zero flag is clear and EAX is undefined.
Sample run picture is shown below.
Extra Credit:
You may notice that in the solution, they only take lower case yn because they used "call ReadChar" and "call WriteChar" to get the user's choice and display the user's choice. If user try to type capital Y the program will exit since it will read the "shift" key as user's input. Any input different from lower case y will be consider a NO choice. Modify your solution so that it handles all following cases:
It can take upp case letters as a user's input.
If the user's choice is not Y y N or n prompt an error message and ask the user to reenter their choice.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
