Question: please help me Now that you have seen the basic operation of MARS, try and write your own program! 1. Modify the add program so

please help me
Now that you have seen the basic operation of MARS, try and write your own program! 1. Modify the add program so that it prompts you for your name and age, and outputs a message that greets you and tells you how old you will be in 4 years. #to read in a string, do the following. The string will be stored in memory at location "answer" li $v0,8 #system code for read string la $a0, answer #put address of answer string in $ao lw $al, alength #put length of string in $al syscall #you also need the following definitions in your .data section for this to work: answer: .space 51 #will hold up to 50 characters, so the name must be 50 characters or less alength: .word 50 2. When you run your program, your console should look like the following: What is your name? Harry Potter What is your age? 11 Hello, Harry Potter You will be 15 years old in four years 3. Format and comment your program appropriately in MARS
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
