In this lab you will read numbers into an array of ints. You will copy the even ints into one array and the odd ints into another array.
Create three arrays of ints in your data segment. The input array, an array for the even ints, and an array for the odd ints. Make each array large enough to hold 25 ints.
Do not use array names in your code. You may use string names in la instructions.
Make sure your program includes comments. You need comments at the top with your name and lab number, and comments for every line of executable code (one comment is sufficient for all statements required for a syscall). Include an explanation of how each register is used.
Comments should reflect the purpose of a statement, not just repeat the instruction. For example, write a comment likeaddi $t4, $t4, 4 # calculate addr of next array element
rather than
addi $t4, $t4, 4 # add 4 to $t4
Email Me |
Office Hours |
My Home Page |
Department Home |
MCC Home Page
© Copyright Emmi Schatz 2023