.data .word #data,next 17,0x10010020, 8,0x10010018, 44,0x0, 15,0x10010000, 23,0x10010010, list: 0x10010008 .text main: lw $a0, list jal print_list #exit the program li $v0, 10 syscall ## # Procedure: print_list(list) # # Prints the elements of a linked list in the order the list is traversed. # # Arguments: # list ($a0) - address of the first node of a singly-linked list of 1-word # integers. # # Algorithm: # // ptr->data: "data" field of the node pointed by "ptr" # // ptr->next: "next" field of the node pointed by "ptr" # ptr = list # while (ptr != 0) { # println(ptr->data); # ptr = ptr->next; # } # print_list: # complete this code!!! jr $ra