Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I only need the notepad++ file. I do NOT need the SPIM part of the project. CS 254 PROGRAMMING ASSIGNMENT #4 Write a program that

image text in transcribed
I only need the notepad++ file. I do NOT need the SPIM part of the project.
CS 254 PROGRAMMING ASSIGNMENT #4 Write a program that computes 23'x. Do this by using register $7 for x and register $10 for the final result. Load $7 at the start of the program with an ori instruction. Assume that bit patterns represent positive integers using unsigned binary. Do the multiplication by shifting and adding Notice that 23'x is equal to 16'x + 4x + 2x + x Don't use explicit multiply instructions. Do use the addu and maybe the addiu instructions. Don't do input or output or loading and storing from memory. The instructions up through chapter 13 are enough. Put the result in register $10 at the end of the program. Write the program so that the value for x can easily be changed by editing the ori instruction at the beginning of the program. Execute your program by repeated "single steps" through the machine code. At the end, $10 should hold the value you expect. Use Set Run Parameters to start the PC at Ox00400000. Create your source file using Notepad++ or other text editor. Align columns, do not use tab characters. Set the option of 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 4 ## ## Compute 23*x ## ## Programmer: ## Date: Following this, include a register use table. Set SPIM options to the following. ON Bare machine ON Enable Delayed Branches ON Enable Mapped IO OFF Load Exception Handler OFF Accept Pseudo Instructions ON Enable Delayed Loads 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 13. Include a register use table in the documentation at the top of your source program. The source program should be nicely formatted. Labels (symbolic addresses) should start in column one. Nearly every line of the program will have a meaningful comment. All comments should start in the same column, perhaps column 35. Upload your source file to Blackboard

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

Describe Balor method and give the chemical reaction.

Answered: 1 week ago

Question

How to prepare washing soda from common salt?

Answered: 1 week ago

Question

Explain strong and weak atoms with examples.

Answered: 1 week ago

Question

Explain the alkaline nature of aqueous solution of making soda.

Answered: 1 week ago

Question

2. What is the impact of information systems on organizations?

Answered: 1 week ago

Question

Evaluate the impact of technology on HR employee services.

Answered: 1 week ago