Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- main:
- la $t0, vals #declares the array
- li $t4, 1111 #declares the 1111 loop termination
- li $t5, 0 #declares array index counter
- li $t6, 0 #declares the variable i
- li $t7, 0 #declares the variable j
- li $s6, 0
- li $t9, 0 #counter for memory address +4
- la $a0, inputdirections #loads the syscall to print the input directions
- li $v0, 4
- syscall
- li $v0, 5 #loads the syscall to read an interger
- syscall
- move $t1, $v0
- LOOP:
- beq $t1, $t4, DONE
- li $v0, 5
- syscall
- move $t0, $v0
- addi $t9, $t9, 4 # keeps track of memory address.
- sw $t1, ($t0)
- addi $t5, $t5, 1 #incriments n
- j LOOP
- DONE:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement