Question: Define a MIPS function named indexOf which will find the position of the first occurrence of a given byte, or target, in a given string.

Define a MIPS function named indexOf which will find the position of the first occurrence of a given byte, or target, in a given string. Assume that register $a0 contains the address of the string, which is terminated with a null byte (0). Assume register $a1 contains the given byte (low order byte, as usual), which is the target.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!