Answered step by step
Verified Expert Solution
Question
1 Approved Answer
.data nums .word 0: 12 size: .word 12 # array of 12 words to contain values # size of array .text s nums la $t5,
.data nums .word 0: 12 size: .word 12 # "array" of 12 words to contain values # size of "array" .text s nums la $t5, size # load address of size variable # load value of size # Populate with twelve values addi $t1, $zero, 55 sw $t1, 0 ($s0) addi $t1, $zero, 88 sw $t1, 4($s0) addi $t1, $zero, 0 sw $t1, 8($s0) addi $t1, $zero, 22 sw $t1, 12($s0) addi $t1, $zero, 77 sw $t1, 16($s0) addi $t1, $zero, 44 sw $t1, 20 ($s0) addi $t1, $zero, 99 sw $t1, 24 (Ss0) addi $t1, $zero, 33 sw $t1, 28($s0) addi $t1, $zero, 110 sw $t1, 32 (Ss0) addi $t1, $zero, 66 sw $t1, 36 (Ss0) addi $t1, $zero, 121 sw $t1, 40 (Ss0) addi $t1, $zero, 11 sw $t1, 44 ($s0) # AT THIS POINT: $50 is the address of the start of the array $55 is the size (= 12) addi $s1, $zero, 2 # Value for j, should be able to set to any valid index # PUT SWAP CODE HERE
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started