Write program mips assembly adds two integer and display sum

Assignment Help Basic Computer Science
Reference no: EM13235182

Write a MIPS assembly language program that adds two integers and displays the sum and the difference. In the .data section, define two variables num1 and num2 both words. Initialize num1 to 45617 10 and num2 to F2D 16 (use 0xF2D to initialize). Your main procedure should load the values of num1 and num2 into two temporary registers, and display them on the console window. Then add the values together, and use the print_int system call function to display the sum on the console window. Also compute the difference of two numbers and display it on the console window. (Reference: see Assignment 1) To print an integer on the console window, you must put the integer to be printed in the $a0 register, and the value 1 in the $v0 register. Then perform a syscall operation. This makes a call to the PCSPIM operating system which will display the integer in $a0 on the console window. Name your source code file assignment2.s. Your output format should look as follows: num1 is: XXX num2 is: XXX num1+num2 = XXX num1-num2 = XXX where XXX is the correct number for each

Reference no: EM13235182

Questions Cloud

Explain how is the rate of disappearance of ozone : How is the rate of disappearance of ozone related to the rate of appearance of oxygen in the following equation: 2 O3 (g) ? 3 O2 (g) (rate expression)
Explain how is the rate of disappearance of ozone : How is the rate of disappearance of ozone related to the rate of appearance of oxygen in the following equation: 2 O3 (g) ? 3 O2 (g) (rate expression)
Define how many valence electrons : How many valence electrons are there in a Cr atom, Which of the following 1M solutions will have the highest concentration of ions
How bank losses from mortgage backed securities could lead : Explain how bank losses from mortgage backed securities could lead to an investment bank becoming insolvent and going bankrupt. Your explanation should use a somewhat realistic T-account (see thenotes), the concept of leverage
Write program mips assembly adds two integer and display sum : Write a MIPS assembly language program that adds two integers and displays the sum and the difference.
Illustrate the us wholesale market for roses : illustrate the U.S. wholesale market for roses. Show on the graph the equilibrium in that market with no international trand and the equilibrium with free trade. Mark on the graph the quantity of roses produced in the United States
Explain what is the molarity of a saturated aqueous solution : The Ksp for BaCO3 is 5.0 x 10-9. What is the molarity of a saturated aqueous solution of BaCO3
Explain current have to be applied to plate of nickel : A current of 5.64 A is pass through a Ni(NO3)2 solution. How long (in hours) would this current have to be applied to plate out 8.80 g of nickel
What is data integrity and in what way it is implemented : What is data integrity and in what way it is implemented in DBMS MS Access

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Determine the actual bits sent by the sender

Determine the actual bits sent by the sender? Include some idleness bits before and after the frame. Let bit-stuffing (also known as bit-insertion).

  Convert each section using the formula

Convert each section using the formula b * 2^2 + b * 2^1 + b* 2^0 and you get the octal number 766. Similarly, 2^4 = 16 so to convert a number from binary to hexadecimal all that is necessary is to start at the right of the number,

  Investigate and discuss how data is structured

Choose any two of the problem areas and discuss in detail how the database approach solves the problem when compared to alternative approaches.

  Explain reinforcement of changing program standards

Use operant conditioning, with the program of shaping, to get sloppy roommate to make bed neatly. Incorporate and label antecedent stimulus.

  Test pseudocode by creating test plans and desk checks

Write down pseudocode for main menu. Write pseudocode for options, only code to navigate menu is required. Sketch flowchart for a main menu.

  What is the unit of data working in the data link layer

What is the unit of data working in the Data Link layer?

  How do we read a numeric value using joptionpane method

How do we read a numeric value using JOptionPane method

  The way to call two functions with the onclick event

add the image so when click on the image it will submit the amount. Also is this the way to call two funtions with the onclick event?

  Write a program that computes the cost of a long-distance

Write a program that computes the cost of a long-distance call. The cost of the call is determined according to the following rate schedule: a. Any call started between 7:00 A.M. and 9:00 P.M.

  Explaining security risks for computing infrastructure

In your new position at XYZ Corporation, you have been asked to lead risk assessment team. As part of project to assess security risks for computing infrastructure.

  State and prove an s-m-n theorem for programs

State and prove an s-m-n theorem for programs. 2. Describe how the universal Turing machine locates a particular instruction on its description tape. 3. Show that the class of sets accepted by Turing machines is closed under union.

  Which of the following addresses are not allowed on internet

Which of the following addresses are not allowed on the internet?

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