ARRAY_LEN = 5 .text main: # Locals # $t0, i # $t1, offset of element # $t2, element li $t0, 0 #i = 0 loop_scan_array: bge $t0, ARRAY_LEN, loop_scan_array_end # i < ARRAY_LEN; #TODO #scanf("%d", &array[i]); addi $t0, $t0, 1 #i++ b loop_scan_array loop_scan_array_end: li $t0, 0 #i = 0 loop_print_array: bge $t0, ARRAY_LEN, loop_print_array_end # i < ARRAY_LEN; mul $t1, $t0, 4 #$t2 = array[i] lw $t2, array($t1) li $v0, 1 move $a0, $t2 #printf("%d", array[i]); syscall li $v0, 11 #putchar(' '); li $a0, ' ' syscall addi $t0, $t0, 1 #i++ b loop_print_array loop_print_array_end: li $v0, 11 #putchar('\n'); li $a0, '\n' syscall li $v0, 0 jr $ra .data array: .word 0:5 #int array[ARRAY_LEN];