Write a mips assembly language program

Assignment Help Assembly Language
Reference no: EM13771809

For this and all programming assignments for this course, you are to write a MIPS assembly language program that can be loaded and executed using the MARS simulator.

For now, I want your programs confined to the core instruction set of the MIPS processor. All of the instructions we have discussed to date are in the core instruction set. Using the MARS Help facility, you can find these listed under "Basic Instructions". (You'll see a large number of instructions there that use "$f.." registers or mention "FP" in the description. Those are floating point instructions. You can ignore them.)

To insure that your program uses only core instructions, go to the "Settings" menu on MARS and make sure the checkbox labeled "Permit extended (pseudo) instructions and formats" is NOT checked. This way MARS will insure you don't accidentally use a pseudoinstruction.

The program is simple, at least in C++. The first thing I want you to do is write and debug the program in C++.
Here's what the program should do:

1. When prompted, the user will simply input numbers, each followed by Enter (or Return). Your program will prompt the user by outputting a question mark followed by a space.

2. Normally, every time the user inputs a number, the program will respond by displaying the smallest and largest numbers seen so far. Both numbers should be displayed on the same line, with the first number followed by a comma and a space, then the second number, then endl.

3. After the smallest and largest values are displayed, the user will be prompted for the next number.

4. An exception to 2 and 3 above happens when the user enters the number -32768. When this number is entered should display, the sum of the values that have been entered (excluding -32768), after which the program should terminate.

Here's a Sample program session:
? 23
23, 23
? 15
15, 23
? -12
-12, 23
? 52
-12, 52
? -32768
78

Of course, after you have your C++ program completed, the fun begins. You need to translate the C++ code to MIPS assembly language, then test and debug using the MARS simulator until the program works correctly. Make sure your source file has the extension ".asm".

Note that your C++ code should be included in comments, as in my examples.

Reference no: EM13771809

Questions Cloud

Was it fair lewis got the death penalty : Was it fair Lewis got the death penalty, even though she didn't "pull the trigger" in the murders while the actual "gunmen" "only" got life in prison
Improvement in tornado prediction in the future : Have you yourself or do you know anyone that has been personally effected by a tornado? What did you learn from the video that affected you most?
Find a reputable article on the web about : Find a reputable article on the web about how to make your market portfolio an efficient portfolio (or how to win at the stock market). Describe the article (in a few paragraphs) and explain why or why not you think it might work.
Explain how you think understanding culture helps in doing : There is a host of sociological and cultural research that paints a robust picture of the effects of globalization on culture. This Application focuses on the flows of culture between Western and developing nations. As a practitioner in this global e..
Write a mips assembly language program : write a MIPS assembly language program that can be loaded and executed using the MARS simulator.
Case study - california choppers : Here is the first thing you will do in the short term towards your recommendation. Here is a sentence or two explaining more about it.
Write a paper about lingering puritan ideals in hawthorne : Write eight pages paper about "Lingering Puritan ideals in Hawthorne and Melville".
Question regarding the analysis of financial statements : What benefits are gained from research, planning, and the analysis of financial statements? Include sources and citing in APA format for each response.
Describe ways in which globalization has changed business : Globalization has significantly changed social life in cities, disassociating it from territoriality. This has had enormous consequences for political, economic, and cultural institutions. To prepare for this Discussion, read the website, Information..

Reviews

Write a Review

Assembly Language Questions & Answers

  Greatest common divisor of integers-masm assembly language

Must be done in MASM assembly language: Greatest common divisor of two integers is largest integer which will evenly divide both integers. GCD algorithm involves integer division in a loop.

  Program that prints your full name on the screen

write an assembly language program that prints your full name on the screen

  Design circuits incorporating microcontrollers

Choose a microcontroller for a particular application and design circuits incorporating microcontrollers plus any additional hardware to control a particular application.

  Requirementsthis project requires you to program a

requirementsthis project requires you to program a maze-type game using assembly language. it is not acceptable to use

  Write a complete well 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.

  Write a program that displays a single character

Description: Write a program that displays a single character at 100 random screen locations, with a delay factor of 100 milliseconds.Hint: set the console window screen height to 200 at runtime, and watch the scroll bar jump up and down.

  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

  Create a short assembly program

You need to create a short assembly program named char_int, stored in file char_int.asm, that prompts the user for a character, and then for an integer.

  Write an assembly program

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

  Multiply by using shift and add instructionsyou have

multiply by using shift and add instructionsyou have studied shift and rotate instructions. when a number is shifted

  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

  Create a assembly language subroutine mulsum that takes an

create a assembly language subroutine mulsum that takes an array named a containing n bytes of positive numbers and

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