Question: I am using AT&T style assembly instruction Write a C-callable assembler version of the library strcpy function called mystrcpy (to avoid conflicts with the library
I am using AT&T style assembly instruction
Write a C-callable assembler version of the library strcpy function called mystrcpy (to avoid conflicts with the library version) that copies the contents of one string to a user provided array and returns a pointer to the provided array. The function prototype is:
char *mystrcpy(char *s, char *ct);
Write your code in a source file named strcpy.s. The provided C driver (strcpyc.c) takes user entered input for the source string and checks both the pointer returned and the effect of the copy. Choose test cases that exercise different possibilities in the logic of your code, e.g. a null string. What would happen if you choose a string longer than the destination array in the Cdriver?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
