Write a mips assembly language program

Assignment Help Assembly Language
Reference no: EM13163683

Assignment Description:
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. Then it should find the number that is computed by
the following C program.
Consult the green sheet and the chapter 3 for assembly instructions for floating point numbers. Here is
one instruction that you might use:
c.lt.s $f2, $f4
bc1t Label1
Here if the value in the register $f2 is less than the value in $f4, it jumps to the Label1. If it should
jump when the value in the register $f2 is NOT less than the value in $f4, then it should be:
c.lt.s $f2, $f4
bc1f Label1
To load a single precision floating point number (instead of lw for an integer), you might use:
l.s $f12, 0($t0)
To store a single precision floating point number (instead of sw for an integer), you might use:
s.s $f12, 0($t0)
To assign a constant floating point number (instead of li for an integer), you might use:
li.s $f12, 123.45
1 of 4
To copy a floating point number from one register to another (instead of move for an integer), you
might use:
mov.s $f10, $f12
The following shows the syscall numbers needed for this assignment.
System Call System Call System Call
Number Operation Description
2 print_float $v0 = 2, $f12 = float number to be printed
4 print_string $v0 = 4, $a0 = address of beginning of ASCIIZ string
6 read_float $v0 = 6; user types a float number at keyboard; value is store in $f0
8 read_string $v0 = 8; user types string at keybd; addr of beginning of string is store in $a0; len in
$a1

Reference no: EM13163683

Questions Cloud

Compute the average grades : Write a program that allows a teacher to compute the average grades for EACH student in his or her class (NOT a single average for the entire class)
Averages ten homework grades entered : Write a program that averages ten homework grades entered by the user. Allow for a bonus homework grade that can count as 5 extra points on their average. Create at least two functions (excluding main() ) in your program. In the first function, pr..
Generates all the possible n-node binary tree configurations : Implement a function that generates all the possible N-node binary tree configurations. The value N is a parameter to the function and the function should return a list of binary tree. Any container ADT (list, queue, vector, etc...) can be used to st..
Modify it so it gives the ith largest number : the follow code gives the ith smallest number, how do you modify it so it gives the ith largest number ?
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..
Program that will accept a real number : Create a program that will accept a real number from the user and then display its whole and fractional parts. (For example, if the input is 5.32, the outputs should be the integer value
Discuss the concept of phase shift in oscillators : Discuss the concept of phase shift in oscillators and how it is controlled in oscillator circuits.
What resources are available on the internet : What resources are available on the Internet to help system administrators determine how to harden a Windows Server 2008? Windows 7 workstation? (List at least three resources in your response.)
Create a structure that has one variable called value : "Create a structure that has one variable called value and one pointer to the list (making it a linked list). Prompt for 5 values from the keyboard as input and store them in the linked list. Print out the current contents of the list.

Reviews

Write a Review

Assembly Language Questions & Answers

  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.

  Problems does an assembler have to overcome

What problems does an assembler have to overcome in order to produce complete binary code with only one pass over the source code? How would code written for a one-pass assembler be different from code written for a two-pass assembler?

  Write mips assembly program to read two non-negative numbers

Write MIPS assembly program to repeatedly read two non-negative integers and print integer product and quotient without using multiplication and division instructions.

  Application that finds all 4 digit numbers

Create an application that finds all 4 digit numbers (those would be the numbers in the range 1000-9999) whose value is equal to the sum of each digit raised to the fourth power. MEANINGFUL output should be sent to the screen.

  Program a maze-type game using assembly language

This project requires you to program a maze-type game using Assembly Language. It is not acceptable to use any other programming language for this project. T

  Write an assembly program

Prepare an Assembly program that reads in a number of cents.

  Allot op-codes and add microcode to microprogram

Allot op-codes and add microcode to microprogram of Mic-1 to implement following instructions which are then included with IJVM instruction set.

  Relative addressing mode is a special way

Relative addressing mode is a special way to specify operands. Which instructions are associated with the relative addressing mode? Why do you think it was called "relative" addressing mode? Hint: Use a search engine to find out about "portable code"

  Multiply by using shift and add instructions

How does real time PCR work to quantify the initial amount of the DNA template? How should the method be modified to quantify the initial amount of RNA template extracted from tissue or cells?

  Write a sequence of two instructions

Write a sequence of two instructions that copies the inter in 4-7 from the AL registers into bits 0-3 of the Bl register. The upper 4 bits of AL will be cleared as will the upper 4 bits of BL. (Microsoft Assembly Language)

  Write assembly program print binary representation-integers

Write the assembly program called hw6_ex1, stored in file hw6_ex1.asm. This program must prompt user to enter signed 32-bit integer. Program must print out binary representation of the integer.

  Function which correctly sorts three

Write an x8086 HLA Assembly language program that implements a function which correctly sorts three parameters and returns a boolean value in AL which should be set to true if any swaps were performed to sort the sequence in increasing order.

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