Question: Starting with the following C++ program: #include using namespace std; extern C Sort (char [] [20], int, int); void main () { char Strings [10]

Starting with the following C++ program:

#include

using namespace std;

extern "C" Sort (char [] [20], int, int);

void main ()

{

char Strings [10] [20]= {

"One",

"Two",

"Three",

"Four",

"Five",

"Six",

"Seven",

"Eight",

"Nine",

"Ten"

};

int i;

cout << "Unsorted Strings are" << endl;

for (i = 0; i < 10; i++)

cout << '\t' << Strings [i] << endl;

Sort (Strings, 10,20);

cout << "Sorted Strings are" << endl;

for (i = 0; i < 10; i++)

cout << '\t' << Strings [i] << endl;

}

Write in assembly language (x86 please) the function Sort. The first parameter is the two dimensional array of bytes, each row being a null terminated C

type string of characters.The second parameter is the number of rows in the array. The third parameter is the number of bytes in one row of the array. The function will sort the

two dimensional array such that the rows now contain data in alphabetical order. You may call the standard C functions strcmp and strcpy if you wish (do not write any C code

of your own). You get a bonus of 20 points if you write the compare and copy functions in assembler. Thank you to whoever takes the time out to reply and help me.

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!