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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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