Question: Need help understanding mips mars code Photo for reference Why and when do we know when to use $s over $t? also on line 15
Need help understanding mips mars code
Photo for reference
Why and when do we know when to use $s over $t?
also on line 15 and 19 there is a z in the end of beq and ble, why is that?

1 data 2 3 prompt: .asciiz " Give me your zip code (0 to stop) : " #prompt for st prompt2: .asciiz "nThe sum of all digit in your zip code is " 5 text 6 7 loop la $a0, prompt #prompt the user for zip-code syscall li $v0, 5 syscall #user enters zip-code move $tl,$vo beaz $t1, finish #if zero then jump to finish li $s0,0 #loa 0 d suum to innerLOOp.: blez $tl,printSum div $s1, sti, 10 #divide by 10 nul $s1,$s1, 10 #multiply result by 10 sub $s3, $t1,$s1 #get the reminder when divide by 10 add $s0,$s0, $s3 #add reminder to s0 that store sum of digit div $t1 ,$t1 , 10 #set ti to result of divide by 10 j innerLoop 21 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
