Assignment 2 – input and output General guidelines Make sure your assembly file will run on SPIM. I’ll be using that to check your code. Submit these two individual files, unzipped: 1. A MIPS assembly...

1 answer below »
needed today.


Assignment 2 – input and output General guidelines Make sure your assembly file will run on SPIM. I’ll be using that to check your code. Submit these two individual files, unzipped: 1. A MIPS assembly file. Should have a “.s” file extension. Remember to clean and comment your code. Focus on outlining the major points with your comments. 2. A PDF file containing the code execution output. Include a short writeup explaining your code and any difficulties you had writing your code. This is your chance to convince me you know what you’re doing or get partial credit. Prompt Using syscalls, request from the user a short string and a number x. Print back the user’s string x times. Example output > Enter a string of no more than 32 characters:< hello="" there=""> Enter how many times to repeat this:< 5=""> Hello there > Hello there > Hello there > Hello there > Hello there
Answered Same DaySep 14, 2021

Answer To: Assignment 2 – input and output General guidelines Make sure your assembly file will run on SPIM....

Sandeep Kumar answered on Sep 14 2021
152 Votes
Code:
.data
newline: .asciiz "\n"
prompt: .asciiz "Enter a string of no more than 32 characters
:"
number: .asciiz "Enter how many times to repeat this:"
name: .space 32 #Creates 32 bytes of space
numb: .space 16 #Creates 16 bytes of space
.text
.globl main
main:
#Print prompt
li...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here