Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCE 212 Quiz 2 – 2/2/11 1.What is the purpose of the jal instruction? 2.What are the two conditional branching (if, goto; not the slt instruction) instructions.

Similar presentations


Presentation on theme: "CSCE 212 Quiz 2 – 2/2/11 1.What is the purpose of the jal instruction? 2.What are the two conditional branching (if, goto; not the slt instruction) instructions."— Presentation transcript:

1 CSCE 212 Quiz 2 – 2/2/11 1.What is the purpose of the jal instruction? 2.What are the two conditional branching (if, goto; not the slt instruction) instructions and what does each do? 3.What are the two instructions needed to push the value of $s4 onto the stack?

2 CSCE 212 Quiz 2 Answers 1.What is the purpose of the jal instruction? – Simultaneously jumps and stores the next instruction’s address in the $ra register

3 CSCE 212 Quiz 2 Answers 2.What are the two conditional branching (if, goto; not the slt instruction) instructions and what does each do? – beq (branch if equal): branches to a given place if the values in 2 registers are equal; eg. beq $s1, $s2, L1 – bne (branch if not equal: branches if the values are not equal; eq. bne $a0, $t3, Exit

4 CSCE 212 Quiz 2 Answers 3.What are the two instructions needed to push the value of $s4 onto the stack? – addi $sp, $sp, -4 sw $s4, 0($sp)


Download ppt "CSCE 212 Quiz 2 – 2/2/11 1.What is the purpose of the jal instruction? 2.What are the two conditional branching (if, goto; not the slt instruction) instructions."

Similar presentations


Ads by Google