Question: Create a MIPS assembly program that compares two strings. If the strings are equal, assign 0 to register $s7 If the first string alphabetically precedes

Create a MIPS assembly program that compares two strings.

If the strings are equal, assign 0 to register $s7

If the first string alphabetically precedes the second, assign -1 to register $s7

o For example, apple comes before zebra

o For example, donkey comes before donuts

If the first string alphabetically succeeds the second, assign 1 to register $s7

o For example, zebra comes after apple o For example, donuts comes after donkey

In your programs data section, you should have two strings labeled string1 and string2. These are the strings that your program will compare.

Your strings must:

Only use lowercase letters in the strings. Do not use uppercase characters, numbers, or symbols/punctuation.

Have equal lengths.

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!