Write a simplified machine language program that has register $s0 loop through the numbers 0, 25, 50, 75, 100. Your program must use the ADDI instructions and store all numbers in registers for...


My current code is as follows, but I'm getting an error input from my grading system. I've attached the assignment and my errors to this question. Thank you!



ADDI $s0, $zero, 0
ADDI $s1, $zero, 100
AGAIN: ADDI $s0, $s0, 25
BEQ $s0, $s1 , DONE
J AGAIN

DONE:


Write a simplified machine language program that has register $s0 loop through the numbers 0, 25, 50, 75, 100.<br>Your program must use the ADDI instructions and store all numbers in registers for computation.<br>

Extracted text: Write a simplified machine language program that has register $s0 loop through the numbers 0, 25, 50, 75, 100. Your program must use the ADDI instructions and store all numbers in registers for computation.
Tests that program loops through 0, 100,200 ... 500, in register $s0 (0.0/4.0)<br>Processing:<br>Current registers: {'$zero': 0}<br>Next line to be processed: 3<br>Processing: ADDI $s0, $zero, 0<br>ADDI<br>( 'Register is',<br>Čurrent registers: {' $s0': 0,<br>Next line to be processed: 4<br>Processing: ADDI $s1, $zero, 500<br>ADDI<br>'values are', 0, 0)<br>'$zero': 0}<br>$s0'<br>('Register is',<br>Current registers: {'$s1': 500,<br>Next line to be processed: 5<br>Processing: AGAIN: ADDI $s0, $s0, 100<br>AGAIN:<br>'$s1', 'values are', 0, 500)<br>'$s0': 0, '$zero': 0}<br>Processing: ADDI $s0, $s0, 100<br>ADDI<br>('Register is',<br>Current registers: {'$s1': 500,<br>Next line to be processed: 6<br>Current registers: {'$s1': 500, '$s0': 100,<br>Next line to be processed: 6<br>Processing: BEQ $s0, $s1<br>BEQ<br>Current registers: {'$sl': 500, '$s0': 100,<br>Next line to be processed: 7<br>Processing: J AGAIN<br>0, 100)<br>$s0': 100,'$zero': 0}<br>'$s0'<br>'values are'<br>$zero': 0}<br>DONE<br>'$zero': 0}<br>J<br>Current registers: {'$sl': 500, '$s0': 100, '$zero': 0}<br>Next line to be processed: 5<br>Processing: AGAIN: ADDI $s0, $s0, 100<br>AGAIN:<br>Processing: ADDI $s0, $s0, 100<br>ADDI<br>('Register is', '$s0', 'values are',<br>Current registers: {'$s1': 500,<br>Next line to be processed: 6<br>Current registers: {'$s1': 500, '$s0': 200, '$zero': 0}<br>Next line to be processed: 6<br>Processing: BEQ $s0, $s1<br>BEQ<br>Current registers: {'$sl': 500, '$s0': 200, '$zero': 0}<br>Next line to be processed: 7<br>Processing: J AGAIN<br>100, 100)<br>' $s0': 200, '$zero': 0}<br>, DONE<br>J<br>Current registers: {'$s1': 500, '$s0': 200, '$zero': 0}<br>Next line to be processed: 5<br>Processing: AGAIN: ADDI $s0, $s0, 100<br>AGAIN:<br>Processing: ADDI $s0, $s0, 100<br>ADDI<br>('Register is',<br>Čurrent registers: {'$s1': 500,<br>Next line to be processed: 6<br>Current registers: {'$sl': 500, '$s0': 300, '$zero': 0}<br>Next line to be processed: 6<br>Processing: BEQ $s0, $s1 , DONE<br>BEQ<br>Current registers: {' $sl': 500, '$s0': 300,<br>Next line to be processed: 7<br>Processing: J AGAIN<br>J<br>'$s0'<br>'values are'<br>, 200, 100)<br>$s0': 300, '$zero': 0}<br>$zero': 0}<br>

Extracted text: Tests that program loops through 0, 100,200 ... 500, in register $s0 (0.0/4.0) Processing: Current registers: {'$zero': 0} Next line to be processed: 3 Processing: ADDI $s0, $zero, 0 ADDI ( 'Register is', Čurrent registers: {' $s0': 0, Next line to be processed: 4 Processing: ADDI $s1, $zero, 500 ADDI 'values are', 0, 0) '$zero': 0} $s0' ('Register is', Current registers: {'$s1': 500, Next line to be processed: 5 Processing: AGAIN: ADDI $s0, $s0, 100 AGAIN: '$s1', 'values are', 0, 500) '$s0': 0, '$zero': 0} Processing: ADDI $s0, $s0, 100 ADDI ('Register is', Current registers: {'$s1': 500, Next line to be processed: 6 Current registers: {'$s1': 500, '$s0': 100, Next line to be processed: 6 Processing: BEQ $s0, $s1 BEQ Current registers: {'$sl': 500, '$s0': 100, Next line to be processed: 7 Processing: J AGAIN 0, 100) $s0': 100,'$zero': 0} '$s0' 'values are' $zero': 0} DONE '$zero': 0} J Current registers: {'$sl': 500, '$s0': 100, '$zero': 0} Next line to be processed: 5 Processing: AGAIN: ADDI $s0, $s0, 100 AGAIN: Processing: ADDI $s0, $s0, 100 ADDI ('Register is', '$s0', 'values are', Current registers: {'$s1': 500, Next line to be processed: 6 Current registers: {'$s1': 500, '$s0': 200, '$zero': 0} Next line to be processed: 6 Processing: BEQ $s0, $s1 BEQ Current registers: {'$sl': 500, '$s0': 200, '$zero': 0} Next line to be processed: 7 Processing: J AGAIN 100, 100) ' $s0': 200, '$zero': 0} , DONE J Current registers: {'$s1': 500, '$s0': 200, '$zero': 0} Next line to be processed: 5 Processing: AGAIN: ADDI $s0, $s0, 100 AGAIN: Processing: ADDI $s0, $s0, 100 ADDI ('Register is', Čurrent registers: {'$s1': 500, Next line to be processed: 6 Current registers: {'$sl': 500, '$s0': 300, '$zero': 0} Next line to be processed: 6 Processing: BEQ $s0, $s1 , DONE BEQ Current registers: {' $sl': 500, '$s0': 300, Next line to be processed: 7 Processing: J AGAIN J '$s0' 'values are' , 200, 100) $s0': 300, '$zero': 0} $zero': 0}
Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here