Question: Problem: String Compare Program Write a program that compares two strings to see if they are the same. Using the . DB directive, create two
Problem: String Compare Program
Write a program that compares two strings to see if they are the same.
Using the DB directive, create two strings, labeled String and String
both of which are appropriately terminated see Part Compare the two
strings, byte by byte, to determine whether the two strings are identical. If
the two strings are identical, end the program with the hexadecimal value
of x in register R otherwise have register R be x
Note: The two strings are not necessarily of the same length, so ensure that
your program works even if the two strings are of different lengths.
Try your program with various ASCII strings in String and String to
ensure that it works in all cases.
Program Test Vectors:
This is a good book.
This is a good book.
This is a good book.
This is not a good book.
This is a good book, the other one is better.
This is a good book.
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
