Question: Write a program in MIPS assembly that computes the sum of four positive integers of your choice. Do this by loading registers at the beginning
Write a program in MIPS assembly that computes the sum of four positive integers of your choice. Do this by loading registers at the beginning of the program with ori instructions. Don't do input or output or loading and storing from memory (since we have not covered this yet.) 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. Use only registers selected from $8 through $15. 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. Align columns, do not use tab characters. Set your editor to use space characters when the tab key is pressed. Every assembly language statement should have a comment that explains what it is doing in terms of the problem. Start your source file with ## CS 254 Program 2 Spring 2021 ## ## Compute a + b + c + d ## ## Programmer: ## Date: Set SPIM options to the following (See chapter 9 page 6): ON Bare machine OFF Allow pseudo instructions OFF Load Exception Handler ON Delayed Branches ON Delayed Load OFF
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
