首页 > > 详细

CSE/EEE 230讲解、辅导MIPS simulator、辅导Python/Java编程设计 调试Web开发|解析Haskell程序

CSE/EEE 230 Assignment 2
Due May 28 (11:59PM)
This assignment is designed to introduce you to the MIPS assembly language and the MIPS simulator.
For this assignment, you are restricted to the following instructions. Do not use extended (pseudo)
instructions or other instructions.
add
sub
addi
a. Open the text editor and type in the following. Then save your work as “assign2.asm”.
.data
.globl main
.text
main:
c. Add the MIPS assembly language instructions (after main:) to complete the following steps. Do not skip
steps. The $s registers must have the correct values at the end. Use other registers as needed.
Actions:
1. Initialize $s0 to 20
2. Initialize $s1 to 30
3. Initialize $s2 to -2
4. Set $s3 to $s1 - $s0 + $s2
5. Set $s4 to $s3 - $s2 + 10
6. Set $s5 to 5 + $s1 -$s2
7. Exchange or swap the values in $s0 and $s1
8. Set $s2 to -$s2
Specifics:
Test and check your work. The results in the registers must be correct at the end of the execution.
Your program will stop when it runs out of instructions.
Documentation:
Comment the beginning of your programs with your name, class ID, and assignment number.
Comment every instruction.
Assignment 2 submittal:
Upload your assembly language program (.asm file) using the link on the website.
Be sure to click on the submit button.

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!