Question: I need help with a MARS MIPS assignment. I need help prompting a user to input two strings (16 characters) and one integer (0-15) and

I need help with a MARS MIPS assignment. I need help prompting a user to input two strings (16 characters) and one integer (0-15) and then displaying what they just inputed using macros. This is what i have so far

.macro printString(%string) la $a0, %string li $v0, 4 syscall .end_macro .macro readInput li $a1, 17 li $v0, 8 syscall .end_macro .macro printInteger la $a0, thirdPrompt li $v0, 4 syscall .end_macro .macro readInteger li $v0, 5 syscall .end_macro

.data

prompt: .asciiz "string 1" secondPrompt: .asciiz "string 2" thirdPrompt: .asciiz "integer" input: .asciiz "you entered " newLine: .asciiz " "

.text

############################ Get User's input ############################### getInput: printString(prompt) readInput printString(newLine) printString(secondPrompt) readInput printString(newLine) printString(thirdPrompt) readInteger printString(newLine) ########################## Printout User's input ############################ printInput: printString(input)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!