QuestionQuestion

Write an ARMv8 program that takes a string as input, then outputs a string that replaces all the vowels in the input string with 'x'.

Your program should give the following input prompt:
Input a string:

Then, your program should output the string with the vowel(s) replaced with x. Your program should terminate upon printing the output.

For example:
Input a string: Hello
Hxllx

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

/*
* main.s
*
*/

.data
stringFormatSpecifier: .asciz "%s"
promptMessage: .asciz "Input a string\n"
newline: .asciz "\n"

stringBuffer:    .space 256

.global main
.text

main:
ldr x0, =stringFormatSpecifier
ldr x1, =promptMessage
bl printf

ldr x1, =stringBuffer
bl scanf

mov x2, #0
mov w3, #120
loop:
ldrb w2, [x1, x2]
cmp w2, #0
b.eq print
cmp w2, #65
b.eq replaceCharacter
cmp w2, #97
b.eq replaceCharacter
cmp w2, #69
b.eq replaceCharacter
cmp w2, #101
b.eq replaceCharacter
cmp w2, #73
b.eq replaceCharacter
cmp w2, #105
b.eq replaceCharacter
cmp w2, #79
b.eq replaceCharacter
cmp w2, #111
b.eq replaceCharacter
cmp w2, #79
b.eq replaceCharacter
cmp w2, #111
b.eq replaceCharacter
incrementCounter:
add x2, x2, #1
b loop...

By purchasing this solution you'll be able to access the following files:
Solution.zip.

50% discount

Hours
Minutes
Seconds
$136.00 $68.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Assembly Language Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats