Prompt the user to enter three integer values

Assignment Help Computer Engineering
Reference no: EM132206423

Write a MIPS program to solve the following problem:

a. Prompt the user to enter 3 integer values.

b. Read the integer.

c. Calculate and print the average of the integers as an integer result.

d. Calculate and print the average of the integers as a floating point number.

The number of decimal places is not relevant in your answer

no Pseudo-instructions allowed

This is what I have so far:

.data

data:.word 0,0,0

prompt: .asciiz "Enter 3 integers\n"

newline: .asciiz "\n"

.text

ori $v0,$0,4 # Command to print string

lui $a0,0x1001 # Sets register for data

addiu $a0,$a0,12 # Get start of prompt

syscall # Print the prompt

ori $v0,$0,5 # Command to read integer

syscall # Value in $v0

lui $t0,0x1001 # Sets register $t0

sw $v0, 0($t0) # Stores value of first integer

ori $v0,$0,5 # Command to read integer

syscall # Value in $v0

lui $t1,0x1001

sw $v0, 4($t1) # Stores value of second integer

ori $v0,$0,5 # Command to read integer

syscall # Value in $v0

lui $t2,0x1001

sw $v0, 8($t2) # Stores value of second integer

add $t0,$t0,$t1

add $t0,$t0,$t2 # Sums three integers

Reference no: EM132206423

Questions Cloud

What is the percentage increase in production : Calculate the companies productivity before the change in work rules and after the change. What is the percentage increase in production?
Write a method that removes the duplicate elements : Write a test program that prompts the user to enter 10 integers to a list and displays the distinct integers separated by exactly one space.
Calculate the price of the bonds : Assuming that the yield to maturity of each bond remains at 9.5% over the next 4 years, calculate the price of bonds at each of the following years to maturity
Efficiency and utilization for brookbury accounting : Calculate the Efficiency and Utilization for Brookbury Accounting. What do these two numbers tell you?
Prompt the user to enter three integer values : Write a MIPS program to solve the following problem: a. Prompt the user to enter 3 integer values. b. Read the integer.
Provide end result of these steps take number 135 : Write MIPS instructions to execute the following steps. Provide end result of these steps Take number 135 [in any register]. Shift the number left 2 times.
In pizza delivery quickly business : In a Pizza Delivery Quickly business. With this type of business in mind, what PMLC model would you use for each of the six subsystems.
How you leverage knowledge gained in intellipath assignments : What competencies were you able to develop in researching and writing the course Comprehensive Project? How did you leverage knowledge gained.
Calculate the stock standard deviation : A stock's returns have the following distribution: Calculate the stock's expected return. Calculate the stock's standard deviation

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd