bobrien314 0 Newbie Poster

I have an assignment due coming up and i am having a little bit of trouble. the purpose of the assignment is to reverse the values an array with the first value being the length of the array, I thought everything was done right but it won't reverse, actually nothing happens in the word section. any helfp would be appriciated. here is the code

.data
.word
array: 25,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25

.text
addi $a1, $0,0
lw $a0, array
la $a2, array

push:
lw $t0,4($a2)
addi $sp,$sp,-4
sw $t0,0($sp)
addi $a1, $a1,1
addi $a2,$a2,4
blt $a1, $a0, push

pop: lw $t0,0($sp)
addi $sp,$sp,4
addi $a1, $a1, -1
addi $a2,$a2,-4
bgt $a1, $0, pop