Prepare a program in mips assembly language

Assignment Help Assembly Language
Reference no: EM13713034

Question- Finding the maximum, the median and the minimum in MIPS

Prepare a program in MIPS assembly language that reads in a sequence of signed 32-bit integers (words) and return the maximum, the minimum, and the median value of the input sequence.

A "special value" 9999 will be used to signify the end of the input sequence. This value is not to be considered part of the input data set.

Thus, any value greater than 9999 that is entered prior to 9999 is considered as a valid input. Zero and negative values are also valid. Empty input sets are also valid.

cases:

Input: 1 3 2 4 5 9999

Output: max: 5; min: 1; median: 3

To avoid division operation, when there are even numbers in the series, you can choose the smaller middle value and median, e.g.,

Input: 1 3 2 4 9999

Output: max: 5; min: 1; median: 2

Use the given line to set up memory to hold the input:

.data

vals: .space 4000

I am having difficulty with this question because I do not know where to start with.

Reference no: EM13713034

Questions Cloud

Evaluate the multiplication and addition table : Evaluate the multiplication and addition table for the prime field GF(7).
Create a structure with the name studentrecord : Create a structure with the name StudentRecord containing a Name stored as an array of 20 characters, an ID stored as an integer, and a GPA stored as a floating-point number.
Write a single arm assembly language instruction : Write a single ARM assembly language instruction equivalent to a function that takes in three strings and checks if any are a substring to one another, if so return 1, if not return 0.
What is the output of the first round of the des algorithm : What is the output of the first round of the DES algorithm when the plaintext and the key are both all zeros?
Prepare a program in mips assembly language : Prepare a program in MIPS assembly language that reads in a sequence of signed 32-bit integers (words) and return the maximum, the minimum, and the median value of the input sequence.
Find the heat absorbed by the gas : A cylinder contains 23 moles of an ideal gas at a temperature of 300 K. The gas is compressed at constant pressure until the final volume equals 0.43 times the initial volume.
Describe why a brute-force attack does not work : Explain exactly why an exhaustive key search will not succeed even though sufficient computational resources are available. This is a paradox since we know that the OTP is unconditionally secure.
Program that counts the number of occurrences of lowercase : Write a program that counts the number of occurrences of lowercase and uppercase vowels in entered lines of text. Use a two-dimensional array to store the vowel counts.
Find the change in the internal energy of the gas : monatomic ideal gas undergoes an isothermal expansion at 300 K, as the volume increased from 0.03 m3 to 0.21 m3 the final pressure of the gas is 60 kPa.

Reviews

Write a Review

Assembly Language Questions & Answers

  Assembly language program that generates and displays

Write a assembly language program that generates and displays 20 random strings, each consisting of ten letter(A-Z, a-z)s or number(0-9)s.

  Design a simple digital clock

Design a simple digital clock

  Create simple 8-bit alu using add-subtract-shift functions

Create a simple 8-bit ALU. Requirements:The eight functions that you will implement are: add, subtract, and, or, shift left logical, less than, shift right logical.

  Write an arm assembly function that takes an array

Write an ARM assembly function that takes an array of integers and insures that all entries are positive. Remember the initial integer in the array is at index zero.

  Write two (2) arm assembly language subroutines

Write two (2) ARM assembly language subroutines, called output_char and read_char

  Assembly language point-of-view

From an Assembly Language point-of-view, any registers that are touched by a function need to first be preserved and then later restored to their original value when that function ends, if that functions wishes to leave no side-effects after its exec..

  Write an assembly program in mips

Write an assembly program in MIPS that get the array size from the keyboard, then reads a list of integers from the keyboard and writes the sorted list in ascending order to the console screen.

  Write an arm assembly function that takes an array of intege

Write an ARM assembly function that takes an array of integers and returns the index of the first occurrence of the integer in the array if it exists or -1 if it does not. Remember the initial integer in the array is at index zero.

  Nonrecursive factorial

Write a nonrecursive version of the Factorial procedure that uses a loop and Write a short program that interactively tests your Factorial procedure.

  Documented assembly language program

Write a complete well documented assembly language program (starts at $C000) that counts the number of 1s in each byte in a list. The LIST_IN starts at $C100

  Analog measurements

Prepare an assembly program for the correctly measures the wind direction

  Write a mips assembly language program

Write a MIPS assembly language program that prompts for a user to enter a series of floating point numbers and calls read_float to read in numbers and store them in an array. Then the program should display the array content on the console window. Th..

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