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

  Provide and analyze the running time of an algorithm

Provide and analyze the running time of an algorithm for finding the shortest simple paths from a source vertex to every other vertex in a graph.

  Deign a synchronization solution using only locks

Deign a synchronization solution using only locks, semaphores and integer variables that achieve.

  Describe the main elements of fisma in the management

From the e-Activity, describe the main elements of FISMA in the management and governance of federal information systems.

  Appropriate text or on-line resource

Just this Qs By consulting an appropriate text or on-line resource, obtain relevant data and hence estimate the vascular resistance of the following organs: 1) the heart (i.e. the coronary circulation) 2) the brain 3) one kidney 4) both kidneys 5)..

  Develop a menu driven console java program todemonstrate

For this assignment, you are required to develop a Menu Driven Console Java Program todemonstrate you can use Java constructs including input/output.

  Why are the given defenses not used extensively

Use the internet to research defenses against cross-site attacks (XSS and XSRF). What are the common defenses? How difficult are they to implement?

  Write general scale down function that takes in any picture

Write a general scale Down function that takes in any picture and an integer x, and creates and returns a new picture 1/x as big using make Empty Picture.

  How did you feel that the object-oriented methodology

Now that you have created and revised the design, how did you feel that the object-oriented methodology with UML enhanced the process of developing they system design? Please provide a 1-page document.

  Displays the frequency table of the characters in the file

Displays the frequency table of the characters in the file, and displays the Huffman code for each character.

  Describe how you would use software metrics to help

explain how you would use software metrics to help minimize the number of defects found by customers after release.

  Role of antennas in transmitting radio waves

Explain the role of antennas in transmitting the radio waves. What kinds of antenna are typically used in the wireless LAN?

  Differences and similarities of pedro and johnbrown

Explain what are the differences and similarities of Pedro and JohnBrown, particularly in relation to their relationships with Tita.

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