Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You have been give palindrome.s, a MIPS assembler problem that reads a line of input and then prints 2 lines. __________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ palindrome.s is # read

You have been give palindrome.s, a MIPS assembler problem that reads a line of input and then prints 2 lines. __________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ palindrome.s is

# read a line and print whether it is a palindrom

main: la $a0, str0 # printf(\"Enter a line of input: \"); li $v0, 4 syscall

la $a0, line la $a1, 256 li $v0, 8 # fgets(buffer, 256, stdin) syscall #

la $a0, not_palindrome li $v0, 4 syscall

la $a0, palindrome li $v0, 4 syscall

li $v0, 0 # return 0 jr $ra

.data str0: .asciiz \"Enter a line of input: \" palindrome: .asciiz \"palindrome \" not_palindrome: .asciiz \"not palindrome \"

# line of input stored here line: .space 256

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Android 4 Application Development

Authors: Reto Meier

3rd Edition

1118223853, 9781118223857

More Books

Students also viewed these Programming questions

Question

Prove that if Σ an is absolutely convergent, then a. an

Answered: 1 week ago