Write a MIPS program that will ask the user to enter two floating point numbers at the console and pass the values to a function that does multiplication
multiplicaiton(float, float):
addiu $sp,$sp,-8
sw $fp,4($sp)
move $fp,$sp
swc1 $f12,8($fp)
swc1 $f14,12($fp)
lwc1 $f2,8($fp)
lwc1 $f0,12($fp)
nop
mul.s $f0,$f2,$f0
move $sp,$fp
lw $fp,4($sp)
addiu $sp,$sp,8
j $31
nop
$LC0:
.ascii "Enter the value of X and Y\000"
main:
addiu $sp,$sp,-40
sw $31,36($sp)
sw $fp,32($sp)
move $fp,$sp
lui $2,%hi($LC0)
addiu $5,$2,%lo($LC0)
lui $2,%hi(_ZSt4cout)
addiu $4,$2,%lo(_ZSt4cout)
jal std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
nop
move $3,$2
lui $2,%hi(_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
addiu $5,$2,%lo(_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
move $4,$3
jal std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))
nop
addiu $2,$fp,24
move $5,$2
lui $2,%hi(_ZSt3cin)
addiu $4,$2,%lo(_ZSt3cin)
jal std::basic_istream<char, std::char_traits<char> >::operator>>(float&)
nop
move $3,$2
addiu $2,$fp,28
move $5,$2
move $4,$3
jal std::basic_istream<char, std::char_traits<char> >::operator>>(float&)
nop
lwc1 $f0,24($fp)
lwc1 $f2,28($fp)
nop
mov.s $f14,$f2
mov.s $f12,$f0
jal multiplicaiton(float, float)
nop
mfc1 $5,$f0
lui $2,%hi(_ZSt4cout)
addiu $4,$2,%lo(_ZSt4cout)
jal std::basic_ostream<char, std::char_traits<char> >::operator<<(float)
nop
move $2,$0
move $sp,$fp
lw $31,36($sp)
lw $fp,32($sp)
addiu $sp,$sp,40
j $31
nop
__static_initialization_and_destruction_0(int, int):
addiu $sp,$sp,-32
sw $31,28($sp)
sw $fp,24($sp)
move $fp,$sp
sw $4,32($fp)
sw $5,36($fp)
lw $3,32($fp)
li $2,1 # 0x1
bne $3,$2,$L7
nop
lw $3,36($fp)
li $2,65535 # 0xffff
bne $3,$2,$L7
nop
lui $2,%hi(_ZStL8__ioinit)
addiu $4,$2,%lo(_ZStL8__ioinit)
jal std::ios_base::Init::Init() [complete object constructor]
nop
lui $2,%hi(__dso_handle)
addiu $6,$2,%lo(__dso_handle)
lui $2,%hi(_ZStL8__ioinit)
addiu $5,$2,%lo(_ZStL8__ioinit)
lui $2,%hi(_ZNSt8ios_base4InitD1Ev)
addiu $4,$2,%lo(_ZNSt8ios_base4InitD1Ev)
jal __cxa_atexit
nop
$L7:
nop
move $sp,$fp
lw $31,28($sp)
lw $fp,24($sp)
addiu $sp,$sp,32
j $31
nop
_GLOBAL__sub_I_multiplicaiton(float, float):
addiu $sp,$sp,-32
sw $31,28($sp)
sw $fp,24($sp)
move $fp,$sp
li $5,65535 # 0xffff
li $4,1 # 0x1
jal __static_initialization_and_destruction_0(int, int)
nop
move $sp,$fp
lw $31,28($sp)
lw $fp,24($sp)
addiu $sp,$sp,32
j $31
nop
PLEASE GIVE A THUMBS UP!!! DONT GIVE A THUMBS DOWN IF YOU HAVE ANY QUERY SO COMMENT DOWN I WILL CLEAR IT FOR YOU
Write a MIPS program that will ask the user to enter two floating point numbers at...
In Python 3, Write a program that reads a set of floating-point values. Ask the user to enter the values, then print: The number of values entered. The smallest of the values The largest of the values. The average of the values. The range, that is the difference between the smallest and largest values. If no values were entered, the program should display “No values were entered” The program execution should look like (note: the bold values are sample user...
In MIPS: Write an assembly program that reads two lists of floating point numbers A and B from users, and displays the measures given above on the simulator’s console. The program’s specifications are given below: • Each input vector should be of size 10, i.e., N=10 • The program should use PROCEDURES to compute dot product. Sample input vectors: A = [0.11 0.34 1.23 5.34 0.76 0.65 0.34 0.12 0.87 0.56] B = [7.89 6.87 9.89 7.12 6.23 8.76 8.21...
c++ no pointers just follow instructions Write a program (array.cpp) that read positive floating point numbers into an array of capacity 100. The program will then ask for one of three letters(A, M or S). if the user inputs something other than one of these letters, then the program should ask for that input until an A, M, or S is entered. A do-while loop should be used for this. If the user inputs an A, then the program should...
Write a console-based program ( C # ) that asks a user to enter a number between 1 and 10. Check if the number is between the range and if not ask the user to enter again or quit. Store the values entered in an array. Write two methods. Method1 called displayByVal should have a parameter defined where you pass the value of an array element into the method and display it. Method2 called displayByRef should have a parameter defined...
Write a program that uses a function that returns the minimum of four floating point numbers. Use a function prototype and pass four parameters. code in c program
Write program in C. Please ask the user to determine how many numbers to enter, and then find and display the largest one with two digits. Please call the following two functions in your main functions. void input_numbers(float *data, int num); void find_largest(float *data, int num); Note: In this assignment, please save the entered numbers using pointer, pass the pointer as the arguments. Depending upon the number of elements, the required size is allocated which prevents the wastage of memory....
Write a MIPS assembly program to calculate nCr. The program should accept the numbers n and r from the user. The program should call the factorial function. nCr = n! / ((n-r)! * r!) If n<r print an error message "n should not be less than r: re-enter the values." and get the inputs n and r from the user.
Write a MIPS Assembly program to accept two numbers A and B from the user. Print all the prime numbers between A and B. Also, check if A and B are prime. If no prime number exits print the string "No prime number between numbers A and B"
C++ Suppose a user is prompted to enter four floating point number values. Write a C++ program that outputs the number of input values, the number of negative values, and the number of even values.
Write a program that prompts the user to enter an integer, n , and then n floating point numbers. As the numbers are read, the program will calculate the average of the negative numbers. In C language.