Write assembly code that computes average

Assignment Help Basic Computer Science
Reference no: EM13307458

#    Using MARS, write Assembly code (for RISC) that computes average of list of mideterm test scores in #  freshman ENGR121 class and return in $v0.  
#    The list consists of scores from 0 through 100 and is terminated with -1.
#    Ignore all other values < 0 and > 100.  
#
#    sum = count = 0;
#    while ( *score != -1) do {
#        sum += *score;
#        count += 1;
#        score += 4;
#    }  
#    average = sum / count;
#
# Inputs :
#    $a0 - address of list of scores
# Outputs:
#    $v0 - returns the average of the test scores or -1.
# Locals:
#    $t0 = score counter
#    $t1 = score sum
#    $t2 = temp for score
#    $t3 = temp
#    $t4 = holds terminator marker, -1
#
# scores:   .word    95, 92, 85, 100, 81, 151, 90, 75, -85, 99, 82, 79, -1

Reference no: EM13307458

Questions Cloud

Calculate the variance-covariance matrix : Calculate the variance-covariance matrix of the OLS estimator of β1.β2 and β3 and verify that:
Calculate the final score and report the results : Given a file with the results from a game of bowling, calculate the final score and report the results to an output file. I do not have to control bad input from file and all numbers will be legal to the game of bowling.
Calculate the work required to move the test charge : Consider two identical +53 microcoulomb point charges placed 58 cm apart. Calculate the work (in J) required to move the test charge to a point 8 cm closer to either of the charges
Determine what the bending moments are at the lifting points : A beam is 11.5m long. There are two lifting points at 2.2m from each end of the beam. Beam self weight = 4kNm superimposed live load = 12kNm. How to determine what the bending moments are at the lifting points
Write assembly code that computes average : Using MARS, write Assembly code (for RISC) that computes average of list of mideterm test scores in #  freshman ENGR121 class and return in $v0.
Determine e at some other lenth along the beam at ends : If e is some value at midspan and e=0 at each end of the beam, and the cable within the beam has a parabolic profile. what is the expression I need to use to determine e at some other lenth along the beam
What is the column density through the center of the sphere : Suppose we have a uniform sphere (radius R) of 1 M of hydrogen. What is the column density through the center of the sphere
What will the pressure and speed be : A pipe with a diameter of 1m carries water at a pressure of 1000kPa and a speed of 6m/s. what will the pressure and speed be in the smaller diameter section of pipe
Explain the standard method of encryption used by the office : Simon works in a government office where encrypted messages are regularly received. He knows that an affine cipher is the standard method of encryption used by the office, and has access to the machine which encrypts.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  How code function that multiplies two matrices using matlab

How to code a function that multiplies two matrices using MATLAB?

  Storage of a large number of items in main memory

Storage of a large number of items in main memory, where accessing an item by its position, and avoiding problems caused by memory fragmentation, are important.

  Both the discussion and in the assignment tool

Post your response to the following questions in both the discussion and in the assignment tool. Name your assignment in the following manner: LastName_4A

  C++ statements that define the function grade

At Enlightened State University, students earn grades of Honors, Pass, or Fail rather than usual letter grade. The function grade returns H, P, F depending on whether avg merits a grade of Honors.

  Writesql statement produce single column called itemlocation

Write an SQL statement to produce a single column called ItemLocation

  Part of a surgical admitting process

Part of a surgical admitting process orderlies are available to escort patients to the pre-surgery preparation area. Patients are not allowed to go by themselves as a matter of policy.

  Mick''s wicks makes candles in various sizes

Mick's Wicks makes candles in various sizes. Create a class for the business named Candle that contains data fields for color, height, and price. Create get methods for all three fields

  Describe what is downward solution

The Conflict Resolution Phase can be thought of as control strategy, describe four types of such strategy Describe what is downward solution

  Better software tool internet explorer or mozilla firefox

There are several Internet browsers available today, and many people select which to use without giving it consideration. Explain which is better software tool: Internet Explorer, Mozilla Firefox, or Google Chrome?

  Write the code for invoking a method

Write the code for invoking a method named sendSignal . There are no arguments for this method. Assume that sendSignal is defined in the same class that calls it.

  Why are organizations important to continual learning

Why are professional organizations important to continual learning? What professional organizations benefit both the employee and the employer.

  Largest positive octal number that can be stored in pdp-9

Data was stored in the PDP-9 computer using six-digit octal notation. Negative numbers were stored in 8's complement form. What is the largest positive octal number that can be stored in this machine?

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