1 / 80

Recitation Material of Quiz 1

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

Download Presentation

Recitation Material of Quiz 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Recitation Material of Quiz 1 June 11, 2013

  2. Problem 1

  3. 551718 ten / 2ten = 275859ten Step 0

  4. 551718 ten / 2ten = 275859ten Step 1: 5/2=2 remainder=1

  5. 551718 ten / 2ten = 275859ten Step 2: remainder 1*10 = 10 10+5 = 15/2 = 7 new_remainder = 1

  6. 551718 ten / 2ten = 275859ten Step 3: remainder 1*10 = 10 10+1 = 11/2 = 5 new_remainder = 1

  7. 551718 ten / 2ten = 275859ten Step 4: remainder 1*10 = 10 10+7 = 17/2 = 8 new_remainder = 1

  8. 551718 ten / 2ten = 275859ten Step 5: remainder 1*10 = 10 10+1 = 17/2 = 5 new_remainder = 1

  9. 551718 ten / 2ten = 275859ten Step 6: remainder 1*10 = 10 10+8 = 18/2 = 9 new_remainder = 0

  10. Problem2

  11. A E B 1 OUT C 1 1 F D

  12. Problem 3

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

  14. Problem 4

  15. 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

  16. 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

  17. 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

  18. 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

  19. 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

  20. 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

  21. 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

  22. 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

  23. 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

  24. 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

  25. 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

  26. 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

  27. 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

  28. 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

  29. 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

  30. 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

  31. 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

  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 0x7ffffe14 0x0040007c $sp step 17

  33. 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

  34. 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

  35. 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

  36. 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

  37. 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

  38. 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

  39. 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

  40. 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

  41. 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

  42. 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

  43. 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

  44. 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

  45. 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

  46. 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

  47. 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

  48. 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

  49. 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

More Related