Question

In: Computer Science

Write a MIPS program that will ask the user to enter two numbers at the console...

Write a MIPS program that will ask the user to enter two numbers at the console and pass the values to a function that does multiplication

Solutions

Expert Solution

.data
   prompt: .asciiz "Enter 2 numbers number "
.text
   main:
  
       #promoting number
       li $v0,4
       la $a0,prompt
       syscall
  
       #reading number
       li $v0, 5
       syscall
       move $a1, $v0
  
       #reading number
       li $v0, 5
       syscall
       move $a2, $v0
  
  
      
       jal mulNumbers
       li $v0,1
       add $a0,$v1,$zero
       syscall
  
      
  
       #tells the system that the program is done
       li $v0 10
       syscall
  
   mulNumbers:
       mul $v1,$a1,$a2
  
       jr $ra
  
   # returns the control to the calling function
  

Note : Please comment below if you have concerns. I am here to help you

If you like my answer please rate and help me it is very Imp for me


Related Solutions

Write a MIPS program that will ask the user to enter two numbers at the console...
Write a MIPS program that will ask the user to enter two numbers at the console and compute xy
In MIPS assembly: Ask the user to enter two numbers and an operation (+ - /...
In MIPS assembly: Ask the user to enter two numbers and an operation (+ - / *). Print the expression back to the user with a blank after the = sign (since the calculation is not being completed.  
Write a mips assembly language program to ask the user to enter two integers A and...
Write a mips assembly language program to ask the user to enter two integers A and B and then display the result of computing the expression: A + 2B - 5.
in MIPS assembly, ask a user for two numbers and to either enter a '1' for...
in MIPS assembly, ask a user for two numbers and to either enter a '1' for addition or '2' for subtraction. using jal, jump to the appropriate procedure for additing or subtracting. then print out result and ask if there is another calculation (terminate program if 'no').
using MIPs assembly, ask the user to enter two numbers. Then multiply the two numbers using...
using MIPs assembly, ask the user to enter two numbers. Then multiply the two numbers using bit shifting (not 'mul'). This should work multiplying 2 positive numbers, 2 negative numbers, and a positive/negative number. Then output the result and ask user if he/she has more calculations to complete.
Write a mips assembly code program that ask the user to enter an integer value, and...
Write a mips assembly code program that ask the user to enter an integer value, and then print the result of doubling that number.
C++ Bubble Sort Write a program that ask user to enter 7 numbers and store that...
C++ Bubble Sort Write a program that ask user to enter 7 numbers and store that in array. Display that all numbers before and after performing Bubble sort. You must have to create new function with required parameter to perform Bubble sort. Sample Run :- Enter 1 number :- 1 Enter 2 number :- 5 Enter 3 number :- 7 Enter 4 number :- 45 Enter 5 number :- 90 Enter 6 number :- 6 Enter 7 number :- 55...
write java program that prompt the user to enter two numbers .the program display all numbers...
write java program that prompt the user to enter two numbers .the program display all numbers between that are divisible by 7 and 8 ( the program should swap the numbers in case the secone number id lower than first one please enter two integer number : 900 199 Swapping the numbers 224 280 336 392 448 504 560 616 672 728 784 840 896 i need it eclipse
write java program that prompt the user to enter two numbers .the program display all numbers...
write java program that prompt the user to enter two numbers .the program display all numbers between that are divisible by 7 and 8 ( the program should swap the numbers in case the secone number id lower than first one please enter two integer number : 900 199   Swapping the numbers 224 280 336 392 448 504 560 616 672 728 784 840 896 i need it eclipse
Write a program that will ask the user to enter the amount of a purchase. The...
Write a program that will ask the user to enter the amount of a purchase. The program should then compute the state and county sales tax. Assume the state sales tax is 5 percent and the county sales tax is 2.5 percent. The program should display the amount of the purchase, the state sales tax, the county sales tax, the total sales tax, and the total of the sale (which is the sum of the amount of purchase plus the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT