Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a MIPS program which prompts the user to enter their favorite type of pie. The program should then print out So you like _____

Write a MIPS program which prompts the user to enter their favorite type of pie. The program should then print out "So you like _____ pie", where the blank line is replaced by the pie type entered.

This is what I wrote but can't get so 'you like [apple] pie on the same line'

.data prompt: .asciiz "What is your favorite type of pie? " # our prompt output1: .asciiz "So you like " # the first part of the output output2: .asciiz " pie" # the second part input: .space 32 # the variable to store the user input .text main:

li $v0, 4 #print the prompt first la $a0, prompt syscall

li $v0, 8 # read the input string into the input variable la $a0, input li $a1, 32 li $a2, 1 syscall

li $v0, 4 # print the first part of the output la $a0, output1 syscall la $a0, input syscall la $a0, output2 syscall

li $v0, 10 #exit syscall

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

Step: 3

blur-text-image

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

Advances In Databases And Information Systems Uropean Conference Adbis 2020 Lyon France August 25 27 2020 Proceedings Lncs 12245

Authors: Jerome Darmont ,Boris Novikov ,Robert Wrembel

1st Edition

3030548317, 978-3030548315

More Books

Students also viewed these Databases questions

Question

Understand the roles of signs, symbols, and artifacts.

Answered: 1 week ago

Question

Discuss the key ambient conditions and their effects on customers.

Answered: 1 week ago

Question

Be familiar with the integrative servicescape model.

Answered: 1 week ago