800 likes | 872 Views
Recitation Material of Quiz 1. June 11, 2013. Problem 1. 551718 ten / 2ten = 275859ten. Step 0. 551718 ten / 2ten = 275859ten. Step 1: 5/2=2 remainder=1. 551718 ten / 2ten = 275859ten. Step 2: remainder 1*10 = 10
E N D
Recitation Material of Quiz 1 June 11, 2013
551718 ten / 2ten = 275859ten Step 1: 5/2=2 remainder=1
551718 ten / 2ten = 275859ten Step 2: remainder 1*10 = 10 10+5 = 15/2 = 7 new_remainder = 1
551718 ten / 2ten = 275859ten Step 3: remainder 1*10 = 10 10+1 = 11/2 = 5 new_remainder = 1
551718 ten / 2ten = 275859ten Step 4: remainder 1*10 = 10 10+7 = 17/2 = 8 new_remainder = 1
551718 ten / 2ten = 275859ten Step 5: remainder 1*10 = 10 10+1 = 17/2 = 5 new_remainder = 1
551718 ten / 2ten = 275859ten Step 6: remainder 1*10 = 10 10+8 = 18/2 = 9 new_remainder = 0
A E B 1 OUT C 1 1 F D
B = A = then = =B’s ones-complement (since B+ = , and B+ +1= + = ) So, – B = + – And thus A-B = A + + – = + + – = – =
0x7ffffe20 $sp 0x00400018 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra step 0
0x00400018 0x7ffffe1c $sp [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra step 1
0x00400018 0x7ffffe1c $sp [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra step 2
0x00400018 0x7ffffe1c $sp [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra step 3
0x00400018 0x7ffffe1c $sp [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra step 4
0x00400018 0x7ffffe1c $sp [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra step 5
0x00400018 0x7ffffe1c $sp [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra step 6
0x00400018 0x7ffffe1c $sp [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra step 7
0x00400018 0x7ffffe1c $sp [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra step 8
0x00400018 0x7ffffe1c $sp [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra step 9
0x00400018 0x7ffffe1c $sp [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra step 10
0x00400018 0x7ffffe1c $sp [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra step 11
0x00400018 0x7ffffe1c $sp [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra step 12
0x00400018 0x7ffffe1c $sp [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra step 13
0x00400018 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x7ffffe14 0x0040007c $sp step 14
0x00400018 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x7ffffe14 0x0040007c $sp step 15
0x00400018 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x7ffffe14 0x0040007c $sp step 16
0x00400018 0x00000003 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x7ffffe14 0x0040007c $sp step 17
0x00400018 0x00000003 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x7ffffe14 0x0040007c $sp step 17
0x00400018 0x00000003 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x0040007c 0x7ffffe0c $sp step 18
0x00400018 0x00000003 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x0040007c 0x7ffffe0c 0x00400040 $sp step 19
0x00400018 0x00000003 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x0040007c 0x7ffffe0c 0x00400040 $sp step 20
0x00400018 0x00000003 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x0040007c 0x7ffffe0c 0x00400040 $sp step 21
0x00400018 0x00000003 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x0040007c 0x00000002 0x7ffffe0c 0x00400040 $sp step 22
0x00400018 0x00000003 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x0040007c 0x00000002 0x7ffffe0c 0x00400040 $sp step 23
0x00400018 0x00000003 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x0040007c 0x00000002 0x00400040 0x7ffffe04 $sp step 24
0x00400018 0x00000003 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x0040007c 0x00000002 0x00400040 0x7ffffe04 0x00400040 $sp step 25
0x00400018 0x00000003 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x0040007c 0x00000002 0x00400040 0x7ffffe04 0x00400040 $sp step 26
0x00400018 0x00000003 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x0040007c 0x00000002 0x00400040 0x7ffffe04 0x00400040 $sp step 27
0x00400018 0x00000003 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x0040007c 0x00000002 0x00400040 0x00000001 0x7ffffe04 0x00400040 $sp step 28
0x00400018 0x00000003 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x0040007c 0x00000002 0x00400040 0x00000001 0x7ffffe04 0x00400040 $sp step 29
0x00400018 0x00000003 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x0040007c 0x00000002 0x00400040 0x00000001 0x00400040 0x7ffffdfc $sp step 30
0x00400018 0x00000003 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x0040007c 0x00000002 0x00400040 0x00000001 0x00400040 0x00400040 0x7ffffdfc $sp step 31
0x00400018 0x00000003 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x0040007c 0x00000002 0x00400040 0x00000001 0x00400040 0x00400040 0x7ffffdfc $sp step 32
0x00400018 0x00000003 [00400024] 23bdfff8 addi $sp, $sp, -8 [00400028] afbf0000 sw $ra, 0($sp) [0040002c] 34020001 ori $v0, $0, 1; 16: li $v0, 1 # 0! = 1 [00400030] 10800006 beq $a0, $0, 24 [zero-0x00400030][00400034] afa40004 sw $a0, 4($sp) [0040003c] 0c100009 jal 0x00400024 [factorial] [00400040] 8fa40004 lw $a0, 4($sp) [00400044] 70821002 mul $v0, $a0, $v0 [00400048] 8fbf0000 lw $ra, 0($sp) [0040004c] 23bd0008 addi $sp, $sp, 8 [00400050] 03e00008 jr $ra [00400054] 23bdfffc addi $sp, $sp, -4 [main: Entry] [00400058] afbf0000 sw $ra, 0($sp) [0040005c] 3c011001 lui $at, 4097 [prompt]; 39: la $a0, prompt [00400060] 34240000 ori $a0, $at, 0 [prompt] [00400064] 34020004 ori $v0, $0, 4; 40: li $v0, 4 [00400068] 0000000c syscall [0040006c] 34020005 ori $v0, $0, 5; 43: li $v0, 5 [00400070] 0000000c syscall [00400074] 00022021 addu $a0, $0, $v0 [00400078] 0c100009 jal 0x00400024 [factorial]; [0040007c] 00022021 addu $a0, $0, $v0 [00400080] 34020001 ori $a0, $0, 1; 50: li $v0, 1 [00400084] 0000000c syscall [00400088] 3c011001 lui $at, 4097 [endl]; 53: la $a0, endl [0040008c] 3424001f ori $a0, $1, 31 [endl] [00400090] 34020004 ori $v0, $0, 4; 54: li $v0, 4 [00400094] 0000000c syscall [00400098] 34020000 ori $at, $0, 0; 57: li $v0, 0 # Return zero. [0040009c] 8fbf0000 lw $ra, 0($sp) [004000a0] 23bd0004 addi $sp, $sp, 4[004000a4] 03e00008 jr $ra; 61: jr $ra 0x0040007c 0x00000002 0x00400040 0x00000001 0x00400040 0x00400040 0x7ffffdfc $sp step 33