




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Exam; Professor: Zhang; Class: COMPUTER ORG I; Subject: COMPUTER DESIGN/ARCHITECTURE; University: Florida State University; Term: Fall 2009;
Typology: Exams
1 / 8
This page cannot be seen from the preview
Don't miss anything!
Part I. Multiple choice questions. Please select one answer for each question by circling the index of the answer. 8 points for each question. You may also write down a short sentence in the provided space to explain your choice. If your choice is wrong but your explanation is partially correct, partial credit will be given.
la $t0, L1’’ is a pseudo instruction which loads the address of associated with L1 into a register $t0. Now suppose
jal’’ is not supported by hardware and is a pseudo instruction. Which of the following correctly implements instruction ``jal f1’’?(a) la $ra, L j f L1: nop # or any instruction after calling the f1 function (b) la $t0, f jr f L1: nop # or any instruction after calling the f1 function (c) la $ra, f j f L1: nop # or any instruction after calling the f1 function (d) None of the above. (a)
Part II. Short answer questions
sll $t1, $t0, 2 add $t2, $t1, $a add $t3, $t1, $a add $t4, $t1, $a lw $t5, 0($t2) lw $t6, 0($t3) blt $t5, $t6, function1L1 # goto function1L1 if $t5 l $t addi $t7, $t6, 0 addi $t6, $t5, 0 addi $t5, $t7, 0 function1L1: andi $t8, $t0, 1 beq $t8, $0, function1L sw $t5, 0($t4) j function1L function1L2: sw $t6, 0($t4) function1L3: addi $t0, $t0, 1 bne $t0, $a3, function1L jr $ra