Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

program for spim, thank you bery much! Spring 2020 Write a program that computes 45 + 89 + 76 + 17. Do this by loading

image text in transcribed
program for spim, thank you bery much!
Spring 2020 Write a program that computes 45 + 89 + 76 + 17. Do this by loading the registers at the beginning of the program with ori instructions. Don't do input or output or loading and storing from memory. The instructions up through chapter 10 are enough. Put the result in register $10 at the end of the program. You will need several addu instructions since machine instructions have only two operands. Execute your program by repeated "single steps" through the machine code. At the end, $10 should hold the value you expect. Create your source file using Notepad++ or other text editor. Alian columns, do not use tab characters. Set your editor to use space characters when the tab key is pressed. Every assembly language statement should be documented in a way that explains what it is doing in terms of the problem. Start your source file with ## CS 254 Program 3 Spring 2020 # ## Compute 45 + 89 + 76 + 17 ## Programmer: * Date: Upload your source file to Blackboard. Set SPIM options to the following (See chapter 9 page 6): ON General registers in hexadecimal ON Save window positions OFF Floating point registers in hexadecimal ON Bare machine OFF Allow pseudo instructions OFF Load trap file ON Delayed Branches ON Delayed Load OFF Mapped VO Set these options as specified or SPIM will start up with options you don't want. You may have to set the options, close SPIM, and then restart it for the options to have an effect. Use only those instructions that have been discussed in the notes through chapter 10 column one. Nearly every line of the program will have a meaningful comment. All comments should start in the same column, perhaps column 35. Spring 2020 Write a program that computes 45 + 89 + 76 + 17. Do this by loading the registers at the beginning of the program with ori instructions. Don't do input or output or loading and storing from memory. The instructions up through chapter 10 are enough. Put the result in register $10 at the end of the program. You will need several addu instructions since machine instructions have only two operands. Execute your program by repeated "single steps" through the machine code. At the end, $10 should hold the value you expect. Create your source file using Notepad++ or other text editor. Alian columns, do not use tab characters. Set your editor to use space characters when the tab key is pressed. Every assembly language statement should be documented in a way that explains what it is doing in terms of the problem. Start your source file with ## CS 254 Program 3 Spring 2020 # ## Compute 45 + 89 + 76 + 17 ## Programmer: * Date: Upload your source file to Blackboard. Set SPIM options to the following (See chapter 9 page 6): ON General registers in hexadecimal ON Save window positions OFF Floating point registers in hexadecimal ON Bare machine OFF Allow pseudo instructions OFF Load trap file ON Delayed Branches ON Delayed Load OFF Mapped VO Set these options as specified or SPIM will start up with options you don't want. You may have to set the options, close SPIM, and then restart it for the options to have an effect. Use only those instructions that have been discussed in the notes through chapter 10 column one. Nearly every line of the program will have a meaningful comment. All comments should start in the same column, perhaps column 35

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2017 For Windows Web And Database Applications

Authors: Corinne Hoisington

1st Edition

1337102113, 978-1337102117

More Books

Students also viewed these Databases questions

Question

5. Describe the visual representations, or models, of communication

Answered: 1 week ago