questoin about computer science

0 comments

Write a program in RISCV to accept a string from a user, reverse that string and print it out to the user. You must write a procedure that performs the reversal task.

Example: Please Enter a String: Hello How Are You

Reversed String: uoY erA woH olleH

  1. First write a C/C++ program with a local function to reverse the string.
  2. Convert that program into a MIPS or RISC V program. In the main program, you should give a prompt for the user to enter a string, then pass that string to a procedure (Let us say it is called RevString) that reverses the string.

3. Running a program on QT Spimor any other external tool can help you to verify your code works: QtSpim is the recent version of spim. To run in QtSpim, you have to load that program by going to file -> Loadfile . And then run it from Simulators->Run. After every run, you should reinitialize simulator by Simulator-> Reinitialize Simulator then Load the program again by File->Recentfiles.

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}