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