Recitation Material of Quiz 1 June 11, 2013. Problem 1.

Slides:



Advertisements
Similar presentations
CDA 3100 Recitation Week 8. Question 1.data A:.word 21,3,2,9,100,22,6,15,33,90.text.globl main main: la $a0, A li $a1, 17 li $a2, 10 jal funct li $v0,
Advertisements

CDA 3100 Recitation Week 15. What does the function f1 do:.data A:.word 10,21,45,8,100,15,29,12,3,19 B:.word 2,5,33,5,20,1,53,52,5,5 C:.word 6,8,5,4,5,22,53,12,33,89.text.globl.
1 Answers to Test 1, Question 1 The function determines if the number is divisible by 6. It performs this by dividing the number first by 3 and then by.
Recursion in MIPS Computer Organization I 1 August 2009 © McQuain, Feng & Ribbens Leaf and Non-Leaf Procedures A leaf procedure is one that.
1 Procedure Calls, Linking & Launching Applications Lecture 15 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
Solution 2nd Exam.
The University of Adelaide, School of Computer Science
MIPS Function Continued
Csci136 Computer Architecture II Lab#4. - Stack and Nested Procedures
Fibonacci with Loop int fib1(int i) { int f1 = 1; int f2 = 1; int f3;
Recitation Material of Engineering an Assembler June 11, 2013.
PCSpim Introduction. Register contentProgramMemory contentMessage.
The University of Adelaide, School of Computer Science
.text fact: addiu $sp, $sp, -32 sw $ra, 20($sp) sw $fp, 16($sp) addiu $fp, $sp, 28 sw $a0, 0($fp) bgtz $a0, L2 li $v0, 1 b suffix L2: addi $a0, $a0,
Writing an Embedded Controller. It usually consists of two parts – Initialization – A main loop Experience: – The main loop usually has to deal with many.
Solution to Problem Recitation #1 (Week 2) ECEN350 Prof. Choi.
Assembly Process. Machine Code Generation Assembling a program entails translating the assembly language into binary machine code This requires more than.
MIPS, C, and You. Ropes struct ropeNode { char * string; // 0x0 offset struct ropeNode * next; // 0x4 offset } typedef struct ropeNode* rope; rope weave(char.
MIPS Assembly Language
Comp Sci instruction encoding 1 Instruction Encoding MIPS machine language Binary encoding of instructions MIPS instruction = 32 bits Three instruction.
20/06/2015CSE1303 Part B lecture notes 1 Functions, part 2 Lecture B15 Lecture notes, section B15.
Intro to Computer Architecture
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.
Lecture 5: Procedures. Function call book-keeping in C main() { int i,j,k,m;... i = mult(j,k);... m = mult(i,i);... } /* really dumb mult function */
Lecture 7: MIPS Instruction Set Today’s topic –Procedure call/return –Large constants Reminders –Homework #2 posted, due 9/17/
ECE 15B Computer Organization Spring 2011 Dmitri Strukov Partially adapted from Computer Organization and Design, 4 th edition, Patterson and Hennessy,
Writing an Embedded Controller. It usually consists of two parts – Initialization – A main loop More challenging than HW3 because HW3 is stateless, the.
MIPS function continued. Recursive functions So far, we have seen how to write – A simple function – A simple function that have to use the stack to save.
In Class Execise. .data A:.word 0,1,2,3,4,5,6,7,8,9.text.globl main main: la $a0,A li $a1,6 li $a2,5 jal onUpStream done: li $v0, 10# exit syscall onUpStream:
Procedure (Method) Calls Ellen Spertus MCS 111 September 25, 2003.
April 23, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 9: Assemblers, Linkers, and Loaders * Jeremy R. Johnson Mon. April 23,
Subroutines, parameters and the stack Bryan Duggan.
MIPS Assembly Language Chapter 13 S. Dandamudi To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,
Pseudo instructions. MIPS supports pseudo instructions. We have seen some like – li $t0, 4 which set $t0 to 4. – la $t0, A which puts the address of label.
The Assembly Process Computer Organization and Assembly Language: Module 10.
MIPS Subroutines Subroutine Call – jal subname Saves RA in $31 and jumps to subroutine entry label subname Subroutine Return – jr $31 Loads PC with return.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patterson and Hennessy Text.
MIPS Programming.
CSCI206 - Computer Organization & Programming
MIPS Assembly Language Programming
Prof. Hsien-Hsin Sean Lee
CSCI206 - Computer Organization & Programming
MIPS Procedures.
MIPS instructions.
Pseudo instructions.
CSCI206 - Computer Organization & Programming
CSCI206 - Computer Organization & Programming
CSCI206 - Computer Organization & Programming
MIPS Procedures.
Addressing in Jumps jump j Label go to Label op address 2 address
Solutions Chapter 2.
MIPS Functions.
CSCI206 - Computer Organization & Programming
Pseudo instructions.
MIPS Functions.
MIPS functions.
MIPS Procedures.
Review.
MIPS function continued
Компьютерийн зохион байгуулалт, ассемблер CS201
MIPS Functions.
Computer Architecture Procedure Calls
MIPS function continued
Writing an Embedded Controller
Flow of Control -- Conditional branch instructions
Pointless Poll Clap if you like pizza!.
MIPS Functions.
MIPS function continued
MIPS Functions.
Presentation transcript:

Recitation Material of Quiz 1 June 11, 2013

Problem 1

ten / 2ten = ten Step 0

ten / 2ten = ten Step 1: 5/2=2 remainder=1

ten / 2ten = ten Step 2: remainder 1*10 = = 15/2 = 7 new_remainder = 1

ten / 2ten = ten Step 3: remainder 1*10 = = 11/2 = 5 new_remainder = 1

ten / 2ten = ten Step 4: remainder 1*10 = = 17/2 = 8 new_remainder = 1

ten / 2ten = ten Step 5: remainder 1*10 = = 17/2 = 5 new_remainder = 1

ten / 2ten = ten Step 6: remainder 1*10 = = 18/2 = 9 new_remainder = 0

Problem2

B A C D E F OUT 1 1 1

Problem 3

B = A = then = =B’s ones-complement (since B+ =, and B+ +1= + = ) So, – B = + – And thus A-B = A + + – = + + – = – =

Problem 4

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe20 0x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe14 0x x c

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe14 0x x c

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe14 0x x c

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe14 0x x c 0x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe14 0x x c 0x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe0c 0x x c 0x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe0c 0x x c 0x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe0c 0x x c 0x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe0c 0x x c 0x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe0c 0x x c 0x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe0c 0x x c 0x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe04 0x x c 0x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe04 0x x c 0x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe04 0x x c 0x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe04 0x x c 0x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe04 0x x c 0x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe04 0x x c 0x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffdfc 0x x c 0x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffdfc 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffdfc 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffdfc 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffdfc 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe04 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe04 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe04 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe04 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe04 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe0c 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe0c 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe0c 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe0c 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe0c 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe14 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe14 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe14 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe14 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe1c 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe20 0x x c 0x x x x x x

[ ] 23bdfff8 addi $sp, $sp, -8 [ ] afbf0000 sw $ra, 0($sp) [ c] ori $v0, $0, 1 ; 16: li $v0, 1 # 0! = 1 [ ] beq $a0, $0, 24 [zero-0x ] [ ] afa40004 sw $a0, 4($sp) [ c] 0c jal 0x [factorial] [ ] 8fa40004 lw $a0, 4($sp) [ ] mul $v0, $a0, $v0 [ ] 8fbf0000 lw $ra, 0($sp) [ c] 23bd0008 addi $sp, $sp, 8 [ ] 03e00008 jr $ra [ ] 23bdfffc addi $sp, $sp, -4 [main: Entry] [ ] afbf0000 sw $ra, 0($sp) [ c] 3c lui $at, 4097 [prompt] ; 39: la $a0, prompt [ ] ori $a0, $at, 0 [prompt] [ ] ori $v0, $0, 4 ; 40: li $v0, 4 [ ] c syscall [ c] ori $v0, $0, 5 ; 43: li $v0, 5 [ ] c syscall [ ] addu $a0, $0, $v0 [ ] 0c jal 0x [factorial]; [ c] addu $a0, $0, $v0 [ ] ori $a0, $0, 1 ; 50: li $v0, 1 [ ] c syscall [ ] 3c lui $at, 4097 [endl] ; 53: la $a0, endl [ c] f ori $a0, $1, 31 [endl] [ ] ori $v0, $0, 4 ; 54: li $v0, 4 [ ] c syscall [ ] ori $at, $0, 0 ; 57: li $v0, 0 # Return zero. [ c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4 [004000a4] 03e00008 jr $ra ; 61: jr $ra $sp 0x7ffffe20 0x x c 0x x x x x x

Problem 5

.data prompt:.asciiz”Give radius r:”.text main: la $a0, prompt li $v0, 4 syscall li $v0, 5 syscall li $t3, 3 mult $t3, $v0 mflo $t3 mult $t3, $v0 mflo $a0 li $v0, 1 syscall