Messages ========================= SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s Load terminated. Check code and simulator settings and try again. Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s Load terminated. Check code and simulator settings and try again. Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s Load terminated. Check code and simulator settings and try again. Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s Load terminated. Check code and simulator settings and try again. Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s Load terminated. Check code and simulator settings and try again. Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s Load terminated. Check code and simulator settings and try again. Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s Load terminated. Check code and simulator settings and try again. Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s Load terminated. Check code and simulator settings and try again. Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s Load terminated. Check code and simulator settings and try again. Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s Load terminated. Check code and simulator settings and try again. Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s Load terminated. Check code and simulator settings and try again. Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0109082b sltu $1, $8, $9 ; 23: bgeu $t0, $t1, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400098] 0x3c011001 lui $1, 4097 ; 61: lw $t1, tf [0x0040009c] 0x8c290008 lw $9, 8($1) [0x004000a0] 0x71295002 mul $10, $9, $9 ; 62: mul $t2, $t1, $t1 [0x004000a4] 0x15480004 bne $10, $8, 16 [endOfProgram-0x004000a4]; 63: bne $t2, $t0, endOfProgram Attempt to execute non-instruction at 0x004000b4 Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0109082b sltu $1, $8, $9 ; 23: bgeu $t0, $t1, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400098] 0x3c011001 lui $1, 4097 ; 61: lw $t1, tf [0x0040009c] 0x8c290008 lw $9, 8($1) [0x004000a0] 0x71295002 mul $10, $9, $9 ; 62: mul $t2, $t1, $t1 [0x004000a4] 0x15480004 bne $10, $8, 16 [endOfProgram-0x004000a4]; 63: bne $t2, $t0, endOfProgram [0x004000b4] 0x3402000a ori $2, $0, 10 ; 73: li $v0, 10 [0x004000b8] 0x0000000c syscall ; 74: syscall Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0109082a slt $1, $8, $9 ; 23: bge $t0, $t1, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400098] 0x3c011001 lui $1, 4097 ; 61: lw $t1, tf [0x0040009c] 0x8c290008 lw $9, 8($1) [0x004000a0] 0x71295002 mul $10, $9, $9 ; 62: mul $t2, $t1, $t1 [0x004000a4] 0x15480004 bne $10, $8, 16 [endOfProgram-0x004000a4]; 63: bne $t2, $t0, endOfProgram [0x004000b4] 0x3402000a ori $2, $0, 10 ; 73: li $v0, 10 [0x004000b8] 0x0000000c syscall ; 74: syscall Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0109082a slt $1, $8, $9 ; 23: bge $t0, $t1, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400098] 0x3c011001 lui $1, 4097 ; 61: lw $t1, tf [0x0040009c] 0x8c290008 lw $9, 8($1) [0x004000a0] 0x71295002 mul $10, $9, $9 ; 62: mul $t2, $t1, $t1 [0x004000a4] 0x15480006 bne $10, $8, 24 [endOfProgram-0x004000a4]; 63: bne $t2, $t0, endOfProgram [0x004000bc] 0x3402000a ori $2, $0, 10 ; 73: li $v0, 10 [0x004000c0] 0x0000000c syscall ; 74: syscall Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400040] 0x15000002 bne $8, $0, 8 ; 27: rem $t2, $t1, $t0 [0x00400048] 0x0128001a div $9, $8 [0x0040004c] 0x00005010 mfhi $10 Instruction references undefined symbol at 0x00400050 [0x00400050] 0x15400000 bne $10, $0, 0 [incrementFactor-0x00400050]; 28: bne $t2, $0, incrementFactor Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x29210000 slti $1, $9, 0 ; 23: bge $t1, 0, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400098] 0x3c011001 lui $1, 4097 ; 62: lw $t1, tf [0x0040009c] 0x8c290008 lw $9, 8($1) [0x004000a0] 0x71295002 mul $10, $9, $9 ; 63: mul $t2, $t1, $t1 [0x004000a4] 0x15480006 bne $10, $8, 24 [endOfProgram-0x004000a4]; 64: bne $t2, $t0, endOfProgram [0x004000bc] 0x3402000a ori $2, $0, 10 ; 74: li $v0, 10 [0x004000c0] 0x0000000c syscall ; 75: syscall Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x29210000 slti $1, $9, 0 ; 23: bge $t1, 0, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400098] 0x3c011001 lui $1, 4097 ; 62: lw $t1, tf [0x0040009c] 0x8c290008 lw $9, 8($1) [0x004000a0] 0x71295002 mul $10, $9, $9 ; 63: mul $t2, $t1, $t1 [0x004000a4] 0x15480006 bne $10, $8, 24 [endOfProgram-0x004000a4]; 64: bne $t2, $t0, endOfProgram [0x004000bc] 0x3402000a ori $2, $0, 10 ; 74: li $v0, 10 [0x004000c0] 0x0000000c syscall ; 75: syscall Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x29210000 slti $1, $9, 0 ; 23: bge $t1, 0, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400098] 0x3c011001 lui $1, 4097 ; 62: lw $t1, tf [0x0040009c] 0x8c290008 lw $9, 8($1) [0x004000a0] 0x71295002 mul $10, $9, $9 ; 63: mul $t2, $t1, $t1 [0x004000a4] 0x15480006 bne $10, $8, 24 [endOfProgram-0x004000a4]; 64: bne $t2, $t0, endOfProgram [0x004000bc] 0x3402000a ori $2, $0, 10 ; 74: li $v0, 10 [0x004000c0] 0x0000000c syscall ; 75: syscall Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x29210000 slti $1, $9, 0 ; 23: bge $t1, 0, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400098] 0x3c011001 lui $1, 4097 ; 62: lw $t1, tf [0x0040009c] 0x8c290008 lw $9, 8($1) [0x004000a0] 0x71295002 mul $10, $9, $9 ; 63: mul $t2, $t1, $t1 [0x004000a4] 0x15480006 bne $10, $8, 24 [endOfProgram-0x004000a4]; 64: bne $t2, $t0, endOfProgram [0x004000bc] 0x3402000a ori $2, $0, 10 ; 74: li $v0, 10 [0x004000c0] 0x0000000c syscall ; 75: syscall Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x29210000 slti $1, $9, 0 ; 23: bge $t1, 0, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400098] 0x3c011001 lui $1, 4097 ; 62: lw $t1, tf [0x0040009c] 0x8c290008 lw $9, 8($1) [0x004000a0] 0x71295002 mul $10, $9, $9 ; 63: mul $t2, $t1, $t1 [0x004000a4] 0x15480006 bne $10, $8, 24 [endOfProgram-0x004000a4]; 64: bne $t2, $t0, endOfProgram [0x004000bc] 0x3402000a ori $2, $0, 10 ; 74: li $v0, 10 [0x004000c0] 0x0000000c syscall ; 75: syscall Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x29210000 slti $1, $9, 0 ; 23: bge $t1, 0, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400098] 0x3c011001 lui $1, 4097 ; 62: lw $t1, tf [0x0040009c] 0x8c290008 lw $9, 8($1) [0x004000a0] 0x71295002 mul $10, $9, $9 ; 63: mul $t2, $t1, $t1 [0x004000a4] 0x15480006 bne $10, $8, 24 [endOfProgram-0x004000a4]; 64: bne $t2, $t0, endOfProgram [0x004000bc] 0x3402000a ori $2, $0, 10 ; 74: li $v0, 10 [0x004000c0] 0x0000000c syscall ; 75: syscall Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x29210000 slti $1, $9, 0 ; 23: bge $t1, 0, endLoop [0x0040003c] 0x10200018 beq $1, $0, 96 [endLoop-0x0040003c] [0x0040009c] 0x3c011001 lui $1, 4097 ; 64: lw $t1, tf [0x004000a0] 0x8c290008 lw $9, 8($1) [0x004000a4] 0x71295002 mul $10, $9, $9 ; 65: mul $t2, $t1, $t1 [0x004000a8] 0x15480006 bne $10, $8, 24 [endOfProgram-0x004000a8]; 66: bne $t2, $t0, endOfProgram [0x004000c0] 0x3402000a ori $2, $0, 10 ; 76: li $v0, 10 [0x004000c4] 0x0000000c syscall ; 77: syscall Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x29210000 slti $1, $9, 0 ; 23: bge $t1, 0, endLoop [0x0040003c] 0x10200018 beq $1, $0, 96 [endLoop-0x0040003c] [0x0040009c] 0x3c011001 lui $1, 4097 ; 64: lw $t1, tf [0x004000a0] 0x8c290008 lw $9, 8($1) [0x004000a4] 0x71295002 mul $10, $9, $9 ; 65: mul $t2, $t1, $t1 [0x004000a8] 0x15480006 bne $10, $8, 24 [endOfProgram-0x004000a8]; 66: bne $t2, $t0, endOfProgram [0x004000c0] 0x3402000a ori $2, $0, 10 ; 76: li $v0, 10 [0x004000c4] 0x0000000c syscall ; 77: syscall Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x29210000 slti $1, $9, 0 ; 23: bge $t1, 0, endLoop [0x0040003c] 0x10200018 beq $1, $0, 96 [endLoop-0x0040003c] [0x0040009c] 0x3c011001 lui $1, 4097 ; 64: lw $t1, tf [0x004000a0] 0x8c290008 lw $9, 8($1) [0x004000a4] 0x71295002 mul $10, $9, $9 ; 65: mul $t2, $t1, $t1 [0x004000a8] 0x15480006 bne $10, $8, 24 [endOfProgram-0x004000a8]; 66: bne $t2, $t0, endOfProgram [0x004000c0] 0x3402000a ori $2, $0, 10 ; 76: li $v0, 10 [0x004000c4] 0x0000000c syscall ; 77: syscall Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x29210000 slti $1, $9, 0 ; 23: bge $t1, 0, endLoop [0x0040003c] 0x10200018 beq $1, $0, 96 [endLoop-0x0040003c] [0x0040009c] 0x3c011001 lui $1, 4097 ; 65: lw $t1, tf [0x004000a0] 0x8c290008 lw $9, 8($1) [0x004000a4] 0x71295002 mul $10, $9, $9 ; 66: mul $t2, $t1, $t1 [0x004000a8] 0x15480006 bne $10, $8, 24 [endOfProgram-0x004000a8]; 67: bne $t2, $t0, endOfProgram [0x004000c0] 0x3402000a ori $2, $0, 10 ; 77: li $v0, 10 [0x004000c4] 0x0000000c syscall ; 78: syscall Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200018 beq $1, $0, 96 [endLoop-0x0040003c] [0x00400040] 0x15000002 bne $8, $0, 8 ; 27: rem $t2, $t1, $t0 [0x00400048] 0x0128001a div $9, $8 [0x0040004c] 0x00005010 mfhi $10 [0x00400050] 0x140a000e bne $0, $10, 56 [incrementFactor-0x00400050]; 28: bne $t2, 0, incrementFactor [0x00400088] 0x21290001 addi $9, $9, 1 ; 51: addi, $t1, 1 [0x0040008c] 0x3c011001 lui $1, 4097 ; 52: sw $t1, tf [0x00400090] 0xac290008 sw $9, 8($1) [0x00400094] 0x340c0010 ori $12, $0, 16 ; 55: li $t4, 16 [0x00400098] 0x0810000b j 0x0040002c [whileLoop] ; 56: j whileLoop Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400040] 0x15000002 bne $8, $0, 8 ; 27: rem $t2, $t1, $t0 [0x00400048] 0x0128001a div $9, $8 [0x0040004c] 0x00005010 mfhi $10 [0x00400050] 0x140a000e bne $0, $10, 56 [incrementFactor-0x00400050]; 28: bne $t2, 0, incrementFactor [0x00400088] 0x21290001 addi $9, $9, 1 ; 51: addi, $t1, 1 [0x0040008c] 0x3c011001 lui $1, 4097 ; 52: sw $t1, tf [0x00400090] 0xac290008 sw $9, 8($1) [0x00400094] 0x0810000b j 0x0040002c [whileLoop] ; 56: j whileLoop [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400040] 0x15000002 bne $8, $0, 8 ; 27: rem $t2, $t1, $t0 [0x00400048] 0x0128001a div $9, $8 [0x0040004c] 0x00005010 mfhi $10 [0x00400050] 0x140a000e bne $0, $10, 56 [incrementFactor-0x00400050]; 28: bne $t2, 0, incrementFactor [0x00400088] 0x21290001 addi $9, $9, 1 ; 51: addi, $t1, 1 [0x0040008c] 0x3c011001 lui $1, 4097 ; 52: sw $t1, tf [0x00400090] 0xac290008 sw $9, 8($1) [0x00400094] 0x0810000b j 0x0040002c [whileLoop] ; 56: j whileLoop [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400098] 0x3c011001 lui $1, 4097 ; 65: lw $t1, tf [0x0040009c] 0x8c290008 lw $9, 8($1) [0x004000a0] 0x71295002 mul $10, $9, $9 ; 66: mul $t2, $t1, $t1 [0x004000a4] 0x15480006 bne $10, $8, 24 [endOfProgram-0x004000a4]; 67: bne $t2, $t0, endOfProgram [0x004000bc] 0x3402000a ori $2, $0, 10 ; 77: li $v0, 10 [0x004000c0] 0x0000000c syscall ; 78: syscall Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400040] 0x15000002 bne $8, $0, 8 ; 27: rem $t2, $t1, $t0 [0x00400048] 0x0128001a div $9, $8 [0x0040004c] 0x00005010 mfhi $10 [0x00400050] 0x140a000e bne $0, $10, 56 [incrementFactor-0x00400050]; 28: bne $t2, 0, incrementFactor [0x00400088] 0x21290001 addi $9, $9, 1 ; 51: addi, $t1, 1 [0x0040008c] 0x3c011001 lui $1, 4097 ; 52: sw $t1, tf [0x00400090] 0xac290008 sw $9, 8($1) [0x00400094] 0x0810000b j 0x0040002c [whileLoop] ; 56: j whileLoop [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400040] 0x15000002 bne $8, $0, 8 ; 27: rem $t2, $t1, $t0 [0x00400048] 0x0128001a div $9, $8 [0x0040004c] 0x00005010 mfhi $10 [0x00400050] 0x140a000e bne $0, $10, 56 [incrementFactor-0x00400050]; 28: bne $t2, 0, incrementFactor [0x00400088] 0x21290001 addi $9, $9, 1 ; 51: addi, $t1, 1 [0x0040008c] 0x3c011001 lui $1, 4097 ; 52: sw $t1, tf [0x00400090] 0xac290008 sw $9, 8($1) [0x00400094] 0x0810000b j 0x0040002c [whileLoop] ; 56: j whileLoop [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400098] 0x3c011001 lui $1, 4097 ; 65: lw $t1, tf [0x0040009c] 0x8c290008 lw $9, 8($1) [0x004000a0] 0x71295002 mul $10, $9, $9 ; 66: mul $t2, $t1, $t1 [0x004000a4] 0x15480007 bne $10, $8, 28 [endOfProgram-0x004000a4]; 67: bne $t2, $t0, endOfProgram [0x004000c0] 0x3402000a ori $2, $0, 10 ; 79: li $v0, 10 [0x004000c4] 0x0000000c syscall ; 80: syscall Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400040] 0x15000002 bne $8, $0, 8 ; 27: rem $t2, $t1, $t0 [0x00400048] 0x0128001a div $9, $8 [0x0040004c] 0x00005010 mfhi $10 [0x00400050] 0x140a000e bne $0, $10, 56 [incrementFactor-0x00400050]; 28: bne $t2, 0, incrementFactor [0x00400088] 0x21290001 addi $9, $9, 1 ; 51: addi, $t1, 1 [0x0040008c] 0x3c011001 lui $1, 4097 ; 52: sw $t1, tf [0x00400090] 0xac290008 sw $9, 8($1) [0x00400094] 0x0810000b j 0x0040002c [whileLoop] ; 56: j whileLoop [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400040] 0x15000002 bne $8, $0, 8 ; 27: rem $t2, $t1, $t0 [0x00400048] 0x0128001a div $9, $8 [0x0040004c] 0x00005010 mfhi $10 [0x00400050] 0x140a000e bne $0, $10, 56 [incrementFactor-0x00400050]; 28: bne $t2, 0, incrementFactor [0x00400088] 0x21290001 addi $9, $9, 1 ; 51: addi, $t1, 1 [0x0040008c] 0x3c011001 lui $1, 4097 ; 52: sw $t1, tf [0x00400090] 0xac290008 sw $9, 8($1) [0x00400094] 0x0810000b j 0x0040002c [whileLoop] ; 56: j whileLoop [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200017 beq $1, $0, 92 [endLoop-0x0040003c] [0x00400098] 0x3c011001 lui $1, 4097 ; 65: lw $t1, tf [0x0040009c] 0x8c290008 lw $9, 8($1) [0x004000a0] 0x71295002 mul $10, $9, $9 ; 66: mul $t2, $t1, $t1 [0x004000a4] 0x340d001e ori $13, $0, 30 ; 68: li $t5, 30 [0x004000a8] 0x15480006 bne $10, $8, 24 [endOfProgram-0x004000a8]; 69: bne $t2, $t0, endOfProgram [0x004000c0] 0x3402000a ori $2, $0, 10 ; 80: li $v0, 10 [0x004000c4] 0x0000000c syscall ; 81: syscall Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200018 beq $1, $0, 96 [endLoop-0x0040003c] [0x00400040] 0x15000002 bne $8, $0, 8 ; 27: rem $t2, $t1, $t0 [0x00400048] 0x0128001a div $9, $8 [0x0040004c] 0x00005010 mfhi $10 [0x00400050] 0x140a000f bne $0, $10, 60 [incrementFactor-0x00400050]; 28: bne $t2, 0, incrementFactor [0x0040008c] 0x21290001 addi $9, $9, 1 ; 53: addi, $t1, 1 [0x00400090] 0x3c011001 lui $1, 4097 ; 54: sw $t1, tf [0x00400094] 0xac290008 sw $9, 8($1) [0x00400098] 0x0810000b j 0x0040002c [whileLoop] ; 58: j whileLoop [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200018 beq $1, $0, 96 [endLoop-0x0040003c] [0x00400040] 0x15000002 bne $8, $0, 8 ; 27: rem $t2, $t1, $t0 [0x00400048] 0x0128001a div $9, $8 [0x0040004c] 0x00005010 mfhi $10 [0x00400050] 0x140a000f bne $0, $10, 60 [incrementFactor-0x00400050]; 28: bne $t2, 0, incrementFactor [0x0040008c] 0x21290001 addi $9, $9, 1 ; 53: addi, $t1, 1 [0x00400090] 0x3c011001 lui $1, 4097 ; 54: sw $t1, tf [0x00400094] 0xac290008 sw $9, 8($1) [0x00400098] 0x0810000b j 0x0040002c [whileLoop] ; 58: j whileLoop [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200018 beq $1, $0, 96 [endLoop-0x0040003c] [0x0040009c] 0x3c011001 lui $1, 4097 ; 67: lw $t1, tf [0x004000a0] 0x8c290008 lw $9, 8($1) [0x004000a4] 0x71295002 mul $10, $9, $9 ; 68: mul $t2, $t1, $t1 [0x004000a8] 0x15480006 bne $10, $8, 24 [endOfProgram-0x004000a8]; 69: bne $t2, $t0, endOfProgram [0x004000c0] 0x3402000a ori $2, $0, 10 ; 80: li $v0, 10 [0x004000c4] 0x0000000c syscall ; 81: syscall Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200018 beq $1, $0, 96 [endLoop-0x0040003c] [0x00400040] 0x15000002 bne $8, $0, 8 ; 27: rem $t2, $t1, $t0 [0x00400048] 0x0128001a div $9, $8 [0x0040004c] 0x00005010 mfhi $10 [0x00400050] 0x140a000f bne $0, $10, 60 [incrementFactor-0x00400050]; 28: bne $t2, 0, incrementFactor [0x0040008c] 0x21290001 addi $9, $9, 1 ; 53: addi, $t1, 1 [0x00400090] 0x3c011001 lui $1, 4097 ; 54: sw $t1, tf [0x00400094] 0xac290008 sw $9, 8($1) [0x00400098] 0x0810000b j 0x0040002c [whileLoop] ; 58: j whileLoop [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200018 beq $1, $0, 96 [endLoop-0x0040003c] [0x00400040] 0x15000002 bne $8, $0, 8 ; 27: rem $t2, $t1, $t0 [0x00400048] 0x0128001a div $9, $8 [0x0040004c] 0x00005010 mfhi $10 [0x00400050] 0x140a000f bne $0, $10, 60 [incrementFactor-0x00400050]; 28: bne $t2, 0, incrementFactor [0x0040008c] 0x21290001 addi $9, $9, 1 ; 53: addi, $t1, 1 [0x00400090] 0x3c011001 lui $1, 4097 ; 54: sw $t1, tf [0x00400094] 0xac290008 sw $9, 8($1) [0x00400098] 0x0810000b j 0x0040002c [whileLoop] ; 58: j whileLoop [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200018 beq $1, $0, 96 [endLoop-0x0040003c] [0x0040009c] 0x3c011001 lui $1, 4097 ; 67: lw $t1, tf [0x004000a0] 0x8c290008 lw $9, 8($1) [0x004000a4] 0x71295002 mul $10, $9, $9 ; 68: mul $t2, $t1, $t1 [0x004000a8] 0x15480006 bne $10, $8, 24 [endOfProgram-0x004000a8]; 69: bne $t2, $t0, endOfProgram [0x004000c0] 0x3c011001 lui $1, 4097 ; 80: sw $t2, sof [0x004000c4] 0xac2a0004 sw $10, 4($1) [0x004000c8] 0x3402000a ori $2, $0, 10 ; 81: li $v0, 10 [0x004000cc] 0x0000000c syscall ; 82: syscall Memory and registers cleared and the simulator reinitialized. SPIM Version Version 7.3 of August 26, 2006 Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu). All Rights Reserved. DOS and Windows ports by David A. Carley (dac@cs.wisc.edu). Copyright 1997 by Morgan Kaufmann Publishers, Inc. See the file README for a full copyright notice. Loaded: C:\Program Files\PCSpim\exceptions.s C:\Documents and Settings\WinXPUser\My Documents\controlflow.s successfully loaded [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200018 beq $1, $0, 96 [endLoop-0x0040003c] [0x00400040] 0x15200002 bne $9, $0, 8 ; 27: rem $t2, $t0, $t1 [0x00400048] 0x0109001a div $8, $9 [0x0040004c] 0x00005010 mfhi $10 [0x00400050] 0x140a000f bne $0, $10, 60 [incrementFactor-0x00400050]; 28: bne $t2, 0, incrementFactor [0x00400054] 0x3c011001 lui $1, 4097 ; 34: lw $t2, sof [0x00400058] 0x8c2a0004 lw $10, 4($1) [0x0040005c] 0x3c011001 lui $1, 4097 ; 35: lw $t1, tf [0x00400060] 0x8c290008 lw $9, 8($1) [0x00400064] 0x014a5020 add $10, $10, $10 ; 37: add $t2, $t2, $t2 [0x00400068] 0x01495020 add $10, $10, $9 ; 39: add $t2, $t2, $t1 [0x0040006c] 0x15200002 bne $9, $0, 8 ; 43: div $t3, $t0, $t1 [0x00400074] 0x0109001a div $8, $9 [0x00400078] 0x00005812 mflo $11 [0x0040007c] 0x014b5020 add $10, $10, $11 ; 44: add $t2, $t2, $t3 [0x00400080] 0x3c011001 lui $1, 4097 ; 45: sw $t2, sof [0x00400084] 0xac2a0004 sw $10, 4($1) [0x00400088] 0x340d001e ori $13, $0, 30 ; 47: li $t5, 30 [0x0040008c] 0x21290001 addi $9, $9, 1 ; 53: addi, $t1, 1 [0x00400090] 0x3c011001 lui $1, 4097 ; 54: sw $t1, tf [0x00400094] 0xac290008 sw $9, 8($1) [0x00400098] 0x0810000b j 0x0040002c [whileLoop] ; 58: j whileLoop [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200018 beq $1, $0, 96 [endLoop-0x0040003c] [0x00400040] 0x15200002 bne $9, $0, 8 ; 27: rem $t2, $t0, $t1 [0x00400048] 0x0109001a div $8, $9 [0x0040004c] 0x00005010 mfhi $10 [0x00400050] 0x140a000f bne $0, $10, 60 [incrementFactor-0x00400050]; 28: bne $t2, 0, incrementFactor [0x00400054] 0x3c011001 lui $1, 4097 ; 34: lw $t2, sof [0x00400058] 0x8c2a0004 lw $10, 4($1) [0x0040005c] 0x3c011001 lui $1, 4097 ; 35: lw $t1, tf [0x00400060] 0x8c290008 lw $9, 8($1) [0x00400064] 0x014a5020 add $10, $10, $10 ; 37: add $t2, $t2, $t2 [0x00400068] 0x01495020 add $10, $10, $9 ; 39: add $t2, $t2, $t1 [0x0040006c] 0x15200002 bne $9, $0, 8 ; 43: div $t3, $t0, $t1 [0x00400074] 0x0109001a div $8, $9 [0x00400078] 0x00005812 mflo $11 [0x0040007c] 0x014b5020 add $10, $10, $11 ; 44: add $t2, $t2, $t3 [0x00400080] 0x3c011001 lui $1, 4097 ; 45: sw $t2, sof [0x00400084] 0xac2a0004 sw $10, 4($1) [0x00400088] 0x340d001e ori $13, $0, 30 ; 47: li $t5, 30 [0x0040008c] 0x21290001 addi $9, $9, 1 ; 53: addi, $t1, 1 [0x00400090] 0x3c011001 lui $1, 4097 ; 54: sw $t1, tf [0x00400094] 0xac290008 sw $9, 8($1) [0x00400098] 0x0810000b j 0x0040002c [whileLoop] ; 58: j whileLoop [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200018 beq $1, $0, 96 [endLoop-0x0040003c] [0x00400040] 0x15200002 bne $9, $0, 8 ; 27: rem $t2, $t0, $t1 [0x00400048] 0x0109001a div $8, $9 [0x0040004c] 0x00005010 mfhi $10 [0x00400050] 0x140a000f bne $0, $10, 60 [incrementFactor-0x00400050]; 28: bne $t2, 0, incrementFactor [0x0040008c] 0x21290001 addi $9, $9, 1 ; 53: addi, $t1, 1 [0x00400090] 0x3c011001 lui $1, 4097 ; 54: sw $t1, tf [0x00400094] 0xac290008 sw $9, 8($1) [0x00400098] 0x0810000b j 0x0040002c [whileLoop] ; 58: j whileLoop [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200018 beq $1, $0, 96 [endLoop-0x0040003c] [0x0040009c] 0x3c011001 lui $1, 4097 ; 67: lw $t1, tf [0x004000a0] 0x8c290008 lw $9, 8($1) [0x004000a4] 0x71295002 mul $10, $9, $9 ; 68: mul $t2, $t1, $t1 [0x004000a8] 0x15480006 bne $10, $8, 24 [endOfProgram-0x004000a8]; 69: bne $t2, $t0, endOfProgram [0x004000c0] 0x3402000a ori $2, $0, 10 ; 81: li $v0, 10 [0x004000c4] 0x0000000c syscall ; 82: syscall Registers ========================= PC = 00000000 EPC = 00000000 Cause = 00000000 BadVAddr= 00000000 Status = 3000ff10 HI = 00000000 LO = 00000121 General Registers R0 (r0) = 00000000 R8 (t0) = 00000024 R16 (s0) = 00000000 R24 (t8) = 00000000 R1 (at) = 10010000 R9 (t1) = 00000011 R17 (s1) = 00000000 R25 (t9) = 00000000 R2 (v0) = 0000000a R10 (t2) = 00000121 R18 (s2) = 00000000 R26 (k0) = 00000000 R3 (v1) = 00000000 R11 (t3) = 0000000c R19 (s3) = 00000000 R27 (k1) = 00000000 R4 (a0) = 00000000 R12 (t4) = 00000000 R20 (s4) = 00000000 R28 (gp) = 10008000 R5 (a1) = 7ffff000 R13 (t5) = 0000001e R21 (s5) = 00000000 R29 (sp) = 7fffeffc R6 (a2) = 7ffff004 R14 (t6) = 00000000 R22 (s6) = 00000000 R30 (s8) = 00000000 R7 (a3) = 00000000 R15 (t7) = 00000000 R23 (s7) = 00000000 R31 (ra) = 00400018 FIR = 00009800 FCSR = 00000000 FCCR = 00000000 FEXR = 00000000 FENR = 00000000 Double Floating Point Registers FP0 = 0.000000 FP8 = 0.000000 FP16 = 0.000000 FP24 = 0.000000 FP2 = 0.000000 FP10 = 0.000000 FP18 = 0.000000 FP26 = 0.000000 FP4 = 0.000000 FP12 = 0.000000 FP20 = 0.000000 FP28 = 0.000000 FP6 = 0.000000 FP14 = 0.000000 FP22 = 0.000000 FP30 = 0.000000 Single Floating Point Registers FP0 = 0.000000 FP8 = 0.000000 FP16 = 0.000000 FP24 = 0.000000 FP1 = 0.000000 FP9 = 0.000000 FP17 = 0.000000 FP25 = 0.000000 FP2 = 0.000000 FP10 = 0.000000 FP18 = 0.000000 FP26 = 0.000000 FP3 = 0.000000 FP11 = 0.000000 FP19 = 0.000000 FP27 = 0.000000 FP4 = 0.000000 FP12 = 0.000000 FP20 = 0.000000 FP28 = 0.000000 FP5 = 0.000000 FP13 = 0.000000 FP21 = 0.000000 FP29 = 0.000000 FP6 = 0.000000 FP14 = 0.000000 FP22 = 0.000000 FP30 = 0.000000 FP7 = 0.000000 FP15 = 0.000000 FP23 = 0.000000 FP31 = 0.000000 Console ========================= Text Segment ========================= [0x00400000] 0x8fa40000 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc [0x00400004] 0x27a50004 addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv [0x00400008] 0x24a60004 addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp [0x0040000c] 0x00041080 sll $2, $4, 2 ; 178: sll $v0 $a0 2 [0x00400010] 0x00c23021 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 [0x00400014] 0x0c100009 jal 0x00400024 [main] ; 180: jal main [0x00400018] 0x00000000 nop ; 181: nop [0x0040001c] 0x3402000a ori $2, $0, 10 ; 183: li $v0 10 [0x00400020] 0x0000000c syscall ; 184: syscall # syscall 10 (exit) [0x00400024] 0x3c011001 lui $1, 4097 ; 16: lw $t0, number [0x00400028] 0x8c280000 lw $8, 0($1) [0x0040002c] 0x3c011001 lui $1, 4097 ; 21: lw $t1, tf [0x00400030] 0x8c290008 lw $9, 8($1) [0x00400034] 0x71294802 mul $9, $9, $9 ; 22: mul $t1, $t1, $t1 [0x00400038] 0x0128082a slt $1, $9, $8 ; 23: bge $t1, $t0, endLoop [0x0040003c] 0x10200018 beq $1, $0, 96 [endLoop-0x0040003c] [0x00400040] 0x15200002 bne $9, $0, 8 ; 27: rem $t2, $t0, $t1 [0x00400044] 0x0000000d break $0 [0x00400048] 0x0109001a div $8, $9 [0x0040004c] 0x00005010 mfhi $10 [0x00400050] 0x140a000f bne $0, $10, 60 [incrementFactor-0x00400050]; 28: bne $t2, 0, incrementFactor [0x00400054] 0x3c011001 lui $1, 4097 ; 34: lw $t2, sof [0x00400058] 0x8c2a0004 lw $10, 4($1) [0x0040005c] 0x3c011001 lui $1, 4097 ; 35: lw $t1, tf [0x00400060] 0x8c290008 lw $9, 8($1) [0x00400064] 0x014a5020 add $10, $10, $10 ; 37: add $t2, $t2, $t2 [0x00400068] 0x01495020 add $10, $10, $9 ; 39: add $t2, $t2, $t1 [0x0040006c] 0x15200002 bne $9, $0, 8 ; 43: div $t3, $t0, $t1 [0x00400070] 0x0000000d break $0 [0x00400074] 0x0109001a div $8, $9 [0x00400078] 0x00005812 mflo $11 [0x0040007c] 0x014b5020 add $10, $10, $11 ; 44: add $t2, $t2, $t3 [0x00400080] 0x3c011001 lui $1, 4097 ; 45: sw $t2, sof [0x00400084] 0xac2a0004 sw $10, 4($1) [0x00400088] 0x340d001e ori $13, $0, 30 ; 47: li $t5, 30 [0x0040008c] 0x21290001 addi $9, $9, 1 ; 53: addi, $t1, 1 [0x00400090] 0x3c011001 lui $1, 4097 ; 54: sw $t1, tf [0x00400094] 0xac290008 sw $9, 8($1) [0x00400098] 0x0810000b j 0x0040002c [whileLoop] ; 58: j whileLoop [0x0040009c] 0x3c011001 lui $1, 4097 ; 67: lw $t1, tf [0x004000a0] 0x8c290008 lw $9, 8($1) [0x004000a4] 0x71295002 mul $10, $9, $9 ; 68: mul $t2, $t1, $t1 [0x004000a8] 0x15480006 bne $10, $8, 24 [endOfProgram-0x004000a8]; 69: bne $t2, $t0, endOfProgram [0x004000ac] 0x3c011001 lui $1, 4097 ; 72: lw $t2, sof [0x004000b0] 0x8c2a0004 lw $10, 4($1) [0x004000b4] 0x01495020 add $10, $10, $9 ; 73: add $t2, $t2, $t1 [0x004000b8] 0x3c011001 lui $1, 4097 ; 74: sw $t2, sof [0x004000bc] 0xac2a0004 sw $10, 4($1) [0x004000c0] 0x3402000a ori $2, $0, 10 ; 81: li $v0, 10 [0x004000c4] 0x0000000c syscall ; 82: syscall KERNEL [0x80000180] 0x0001d821 addu $27, $0, $1 ; 82: move $k1 $at # Save $at [0x80000184] 0x3c019000 lui $1, -28672 ; 84: sw $v0 s1 # Not re-entrant and we can't trust $sp [0x80000188] 0xac220200 sw $2, 512($1) [0x8000018c] 0x3c019000 lui $1, -28672 ; 85: sw $a0 s2 # But we need to use these registers [0x80000190] 0xac240204 sw $4, 516($1) [0x80000194] 0x401a6800 mfc0 $26, $13 ; 87: mfc0 $k0 $13 # Cause register [0x80000198] 0x001a2082 srl $4, $26, 2 ; 88: srl $a0 $k0 2 # Extract ExcCode Field [0x8000019c] 0x3084001f andi $4, $4, 31 ; 89: andi $a0 $a0 0x1f [0x800001a0] 0x34020004 ori $2, $0, 4 ; 93: li $v0 4 # syscall 4 (print_str) [0x800001a4] 0x3c049000 lui $4, -28672 [__m1_] ; 94: la $a0 __m1_ [0x800001a8] 0x0000000c syscall ; 95: syscall [0x800001ac] 0x34020001 ori $2, $0, 1 ; 97: li $v0 1 # syscall 1 (print_int) [0x800001b0] 0x001a2082 srl $4, $26, 2 ; 98: srl $a0 $k0 2 # Extract ExcCode Field [0x800001b4] 0x3084001f andi $4, $4, 31 ; 99: andi $a0 $a0 0x1f [0x800001b8] 0x0000000c syscall ; 100: syscall [0x800001bc] 0x34020004 ori $2, $0, 4 ; 102: li $v0 4 # syscall 4 (print_str) [0x800001c0] 0x3344003c andi $4, $26, 60 ; 103: andi $a0 $k0 0x3c [0x800001c4] 0x3c019000 lui $1, -28672 ; 104: lw $a0 __excp($a0) [0x800001c8] 0x00240821 addu $1, $1, $4 [0x800001cc] 0x8c240180 lw $4, 384($1) [0x800001d0] 0x00000000 nop ; 105: nop [0x800001d4] 0x0000000c syscall ; 106: syscall [0x800001d8] 0x34010018 ori $1, $0, 24 ; 108: bne $k0 0x18 ok_pc # Bad PC exception requires special checks [0x800001dc] 0x143a0008 bne $1, $26, 32 [ok_pc-0x800001dc] [0x800001e0] 0x00000000 nop ; 109: nop [0x800001e4] 0x40047000 mfc0 $4, $14 ; 111: mfc0 $a0 $14 # EPC [0x800001e8] 0x30840003 andi $4, $4, 3 ; 112: andi $a0 $a0 0x3 # Is EPC word-aligned? [0x800001ec] 0x10040004 beq $0, $4, 16 [ok_pc-0x800001ec]; 113: beq $a0 0 ok_pc [0x800001f0] 0x00000000 nop ; 114: nop [0x800001f4] 0x3402000a ori $2, $0, 10 ; 116: li $v0 10 # Exit on really bad PC [0x800001f8] 0x0000000c syscall ; 117: syscall [0x800001fc] 0x34020004 ori $2, $0, 4 ; 120: li $v0 4 # syscall 4 (print_str) [0x80000200] 0x3c019000 lui $1, -28672 [__m2_] ; 121: la $a0 __m2_ [0x80000204] 0x3424000d ori $4, $1, 13 [__m2_] [0x80000208] 0x0000000c syscall ; 122: syscall [0x8000020c] 0x001a2082 srl $4, $26, 2 ; 124: srl $a0 $k0 2 # Extract ExcCode Field [0x80000210] 0x3084001f andi $4, $4, 31 ; 125: andi $a0 $a0 0x1f [0x80000214] 0x14040002 bne $0, $4, 8 [ret-0x80000214] ; 126: bne $a0 0 ret # 0 means exception was an interrupt [0x80000218] 0x00000000 nop ; 127: nop [0x8000021c] 0x401a7000 mfc0 $26, $14 ; 137: mfc0 $k0 $14 # Bump EPC register [0x80000220] 0x275a0004 addiu $26, $26, 4 ; 138: addiu $k0 $k0 4 # Skip faulting instruction [0x80000224] 0x409a7000 mtc0 $26, $14 ; 140: mtc0 $k0 $14 [0x80000228] 0x3c019000 lui $1, -28672 ; 145: lw $v0 s1 # Restore other registers [0x8000022c] 0x8c220200 lw $2, 512($1) [0x80000230] 0x3c019000 lui $1, -28672 ; 146: lw $a0 s2 [0x80000234] 0x8c240204 lw $4, 516($1) [0x80000238] 0x001b0821 addu $1, $0, $27 ; 149: move $at $k1 # Restore $at [0x8000023c] 0x40806800 mtc0 $0, $13 ; 152: mtc0 $0 $13 # Clear Cause register [0x80000240] 0x401a6000 mfc0 $26, $12 ; 154: mfc0 $k0 $12 # Set Status register [0x80000244] 0x375a0001 ori $26, $26, 1 ; 155: ori $k0 0x1 # Interrupts enabled [0x80000248] 0x409a6000 mtc0 $26, $12 ; 156: mtc0 $k0 $12 [0x8000024c] 0x42000018 eret ; 159: eret Data Segment ========================= DATA [0x10000000]...[0x10010000] 0x00000000 [0x10010000] 0x00000024 0x00000037 0x00000011 0x00000000 [0x10010010]...[0x10040000] 0x00000000 STACK [0x7fffeffc] 0x00000000 KERNEL DATA [0x90000000] 0x78452020 0x74706563 0x206e6f69 0x636f2000 [0x90000010] 0x72727563 0x61206465 0x6920646e 0x726f6e67 [0x90000020] 0x000a6465 0x495b2020 0x7265746e 0x74707572 [0x90000030] 0x2000205d 0x4c545b20 0x20005d42 0x4c545b20 [0x90000040] 0x20005d42 0x4c545b20 0x20005d42 0x64415b20 [0x90000050] 0x73657264 0x72652073 0x20726f72 0x69206e69 [0x90000060] 0x2f74736e 0x61746164 0x74656620 0x205d6863 [0x90000070] 0x5b202000 0x72646441 0x20737365 0x6f727265 [0x90000080] 0x6e692072 0x6f747320 0x205d6572 0x5b202000 [0x90000090] 0x20646142 0x74736e69 0x74637572 0x206e6f69 [0x900000a0] 0x72646461 0x5d737365 0x20200020 0x6461425b [0x900000b0] 0x74616420 0x64612061 0x73657264 0x00205d73 [0x900000c0] 0x455b2020 0x726f7272 0x206e6920 0x63737973 [0x900000d0] 0x5d6c6c61 0x20200020 0x6572425b 0x6f706b61 [0x900000e0] 0x5d746e69 0x20200020 0x7365525b 0x65767265 [0x900000f0] 0x6e692064 0x75727473 0x6f697463 0x00205d6e [0x90000100] 0x5b202000 0x74697241 0x74656d68 0x6f206369 [0x90000110] 0x66726576 0x5d776f6c 0x20200020 0x6172545b [0x90000120] 0x00205d70 0x5b202000 0x616f6c46 0x676e6974 [0x90000130] 0x696f7020 0x205d746e 0x20000000 0x6f435b20 [0x90000140] 0x636f7270 0x005d3220 0x20000000 0x444d5b20 [0x90000150] 0x005d584d 0x575b2020 0x68637461 0x2020005d [0x90000160] 0x63614d5b 0x656e6968 0x65686320 0x005d6b63 [0x90000170] 0x00000000 0x5b202000 0x68636143 0x00005d65 [0x90000180] 0x90000024 0x90000033 0x9000003b 0x90000043 [0x90000190] 0x9000004b 0x90000071 0x9000008d 0x900000aa [0x900001a0] 0x900000c0 0x900000d6 0x900000e6 0x90000100 [0x900001b0] 0x90000101 0x9000011a 0x90000124 0x90000125 [0x900001c0] 0x90000139 0x9000013a 0x9000013b 0x90000148 [0x900001d0] 0x90000149 0x9000014a 0x9000014b 0x90000154 [0x900001e0] 0x9000015e 0x90000170 0x90000171 0x90000172 [0x900001f0] 0x90000173 0x90000174 0x90000175 0x9000017f [0x90000200]...[0x90010000] 0x00000000