Question
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 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.