Skip to content

Commit

Permalink
Replace tabs with spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom committed Nov 14, 2023
1 parent 170e5e2 commit ac4dccf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions exercises/practice/nth-prime/.meta/example.mips
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ nth_prime:

li $t2, 4 #index * length of integer
mul $t0, $t0, $t2
la $t2, primes
add $t0, $t0, $t2
la $t2, primes
add $t0, $t0, $t2

lw $v0, 0($t0) #check if array index is null
la $t0, primes #array index, if v0 is null
Expand All @@ -42,18 +42,18 @@ loop_primes:
jal is_prime
bne $v0, $zero, prime_found

j loop_primes
j loop_primes

prime_found:
sw $t1, 0($t0)
addi $t0, $t0, 4

la $t2, primes
sub $t2, $t0, $t2
la $t2, primes
sub $t2, $t0, $t2
div $t2, $t2, 4

beq $t2, $t4, done

j loop_primes

done:
Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/nth-prime/runner.mips
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
n: .word 10
# input values (null terminated) & expected output values (word sized ints)
ins: .word 1, 2, 4, 7, 10, 47, 50, 57, 100, 101
outs: .word 2, 3, 7, 17, 29, 211, 229, 269, 541, 547
outs: .word 2, 3, 7, 17, 29, 211, 229, 269, 541, 547

failmsg: .asciiz "failed for test input: "
expectedmsg: .asciiz ". expected "
Expand All @@ -27,7 +27,7 @@ runner:
lw $s0, n
la $s1, ins
la $s2, outs
j run_test
j run_test

run_test:
lw $a0, 0($s1) # move input number to a0
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/square-root/runner.mips
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runner:
lw $s0, n
la $s1, ins
la $s2, outs
j run_test
j run_test

run_test:
lw $a0, 0($s1) # move input number to a0
Expand Down

0 comments on commit ac4dccf

Please sign in to comment.