Write a MIPS program that adds all of the positive integers below 1000
that are multiples of 3 or 5. The answer should be in register
$t0
when the program completes. For example,
if I asked to add up
the numbers below 10 that are multiples of 3 or 5 the answer would be
$3 + 5 + 6 + 9 = 23$ with $23$ being the value in $t0
.
Remember, the value will display in SPIM in hexadecimal.
Write the Java or Python version of this program first and then translate that to the MIPS.
Your program will be graded out of ten points based on the following requirements.
username_hw1.s
where
username
is your user name. Make sure the subject heading says
CS220 HW 1
$t0
. The
correct answer is 233,168ten
#-------------------------------------------------------- # Name: Ed Harcourt # Date: 2/1/12 # Assignment: HW 1 # # This program computes the sum of the numbers below # 1000 that are divisible by 3 or 5 and leaves the # result in register $t0. #--------------------------------------------------------