Quiz 3 - 1. At the beginning of a procedure, we want to...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
1. At the beginning of a procedure, we want to save the values in registers $a0, $ra, and $s0 into the stack. Which instruction below can we use to make room in the stack for these register values?
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
A. ad di  $s p,  $s p,  -3 B. ad di  $s p,  $s p,  3 C. ad di  $s p,  $s p,  -1 2 D. ad di  $s p,  $s p,  12
Background image of page 2
Points Earned: 1/1 Correct Answer: C Your Response: C 2. For the below assembly code, what is the content of register $ra just after executing the instruction 'jal rt1'  assuming the value in $t0 is equal to the value in $t1? rt1:      . .. rt2:      . .. main:    . ..            bne $t0, $t1, brch            jal rt1 done:   j finish brch:    jal rt2 finish:   . ..
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Th ad dr es of  ins tru cti on  la be le by  'rt 1' B. Th ad dr es of  ins tru cti on  la be le by  'do ne' C. Th
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 13

Quiz 3 - 1. At the beginning of a procedure, we want to...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online