Question: In a design document, outline the design and implementation strategy for an assembly proce - dure called strpbrk , identical in functionality and behaviour as
In a design document, outline the design and implementation strategy for an assembly proce
dure called strpbrk identical in functionality and behaviour as the standard C library string
function strpbrk You can use man strpbrk to find the full documentation of the C func
tion and its behaviour. Your task is to implement an assembly version of this function. The
function takes as its two parameters the address of a readonly const char null
terminated string s and the address of a readonly const char nullterminated
string accept The function locates the first occurrence in the string s of any of the char
acters in the string accept. The function returns a pointer to the first occurrence of such
character, or a NULL pointer if none are found.
Write, and test using QEMU, the RISCV assembly procedure strpbrk Also, write a main
program to test your procedure. The program should prompt the user to input two strings
you can assume that the strings will be at most characters each, not including the zero
byte delimiter call the function, display a message indicating whether an occurrence has
been found, and finally terminate. Your code must use the standard conventions
covered in class for passing parameters, returning results, and using the stack.
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
