Reference no: EM132171706
USING MIPS ASSEMBLYLANGUAGE W/ NO PSUEDO CODE.
NO li or la! all basic instructions
Need help with these two functions!
1. print
$a0 - address of a string to print ,$a1 - value of an integer value to print, $a2 - boolean value (1 or 0)
This function must first print the string, then if $a2 holds a 1 (for true) print the integer that is in $a1. Both outputs must be on the same line. End the output with a newline.
2. main
a. Print your name by calling the print function (above). You will need to set the parameter registers before calling the function.
b. Print a prompt to enter an integer by calling the print function. You will need to set the parameter registers before calling the function.
c. Read the integer entered. This is the number of times to repeat step d.
d. Repeat the following multiple times according to the number read in step c
i. Print a prompt to enter an integer by calling the print function. You will need to set the parameter registers before calling the function.
ii. Read the first number.
iii. Print a prompt to enter a second integer by calling the print function. You will need to set the parameter registers before calling the function.
iv. Read the second number.
v. If the first number is greater than the second number Print an error message by calling the print function. You will need to set the parameter registers before calling the function
ELSE
Calculate the sum of the values from the first number THROUGH the second number Print the sum of values by calling the print function. You will need to set the parameter registers before calling the function.
e. Print an ending message by calling the print function
f. End your program.