Browse Source

Fix strange formatting bug

develop
Matthew Faltys 5 years ago
parent
commit
b28872238d
  1. 8
      prj1.asm

8
prj1.asm

@ -13,9 +13,9 @@ main:
syscall syscall
move $a1, $v0 move $a1, $v0
la $a0, arr # $a0 based address of array la $a0, arr # $a0 based address of array
#li $a1, 1 # $a1 number to be found (checked) - change the value (7) to test #li $a1, 1 # $a1 number to be found (checked) - change the value (7) to test
li $a2, 6 # $a2 max array index to be checked - change the value (3) to test li $a2, 6 # $a2 max array index to be checked - change the value (3) to test
li $s0, 0 # set counter to 0 li $s0, 0 # set counter to 0
jal lookup # hop to lookup function jal lookup # hop to lookup function
@ -57,7 +57,7 @@ lookup:
.data .data
arr: .word 5, 2, 1, 4, 6, 3 # change array to test arr: .word 5, 2, 1, 4, 6, 3
enter_num: .asciiz "Enter number to be found: " enter_num: .asciiz "Enter number to be found: "
newline: .asciiz "\n" newline: .asciiz "\n"
str_found: .asciiz "found" str_found: .asciiz "found"

Loading…
Cancel
Save