Rars Rise V please Write a program that inserts a minus “-“ between all (!) double-consonants: Tunnel ->...

90.2K

Verified Solution

Question

Programming

Rars Rise V please

Write a program that inserts a minus “-“ between all (!)double-consonants:

Tunnel -> Tun-nel Busseat -> Bus-seat

And so on..

Howto:

Write a program that lets you enter a string.

  • Use ecall(12) readchar for that in a loop until carriagereturn.

  • The string can be limited to 30 letters.

  • Make a static string array in the data section holding at least40 letters.

  • Loop over the string searching for double-consonants.

  • Have a second string for the result.

  • Print the result string.

You can use:

.global _start # Provide program starting address to linker_start:

#loop
addi a7, x0, 12 # linux write system call

ecall .data

sourcestring: .ascii \" \" #30

targetstring: .ascii \" \"#40

Answer & Explanation Solved by verified expert
3.6 Ratings (338 Votes)
Could you please leave a THUMBS Up for my work RARS RISCV Assembler and Runtime Simulator It is used to assemble and simulate the execution of RISCV assembly language programsIts goal is    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students