PCSpim Introduction Register content Program Memory content Message Register Content PC Status R0 R1 R2 R3 R4 R5 R6 R7 = 00000000 = 3000ff10 (r0) = 00000000 (at) = 00000000 (v0) = 00000000 (v1) = 00000000 (a0) = 00000000 (a1) = 00000000 (a2) = 00000000 (a3) = 00000000 FIR FENR = 00000000 Cause = 00000000 BadVAddr= 00000000 = 00000000 LO = 00000000 General Registers R8 (t0) = 00000000 R16 (s0) = 00000000 R24 (t8) = 00000000 R9 (t1) = 00000000 R17 (s1) = 00000000 R25 (t9) = 00000000 R10 (t2) = 00000000 R18 (s2) = 00000000 R26 (k0) = 00000000 R11 (t3) = 00000000 R19 (s3) = 00000000 R27 (k1) = 00000000 R12 (t4) = 00000000 R20 (s4) = 00000000 R28 (gp) = 10008000 R13 (t5) = 00000000 R21 (s5) = 00000000 R29 (sp) = 7fffeffc R14 (t6) = 00000000 R22 (s6) = 00000000 R30 (s8) = 00000000 R15 (t7) = 00000000 R23 (s7) = 00000000 R31 (ra) = 00000000 = 00009800 = 00000000 FP0 FP2 FP4 FP6 = 0.000000 = 0.000000 = 0.000000 = 0.000000 FP0 FP1 FP2 FP3 FP4 FP5 FP6 FP7 = 0.000000 = 0.000000 = 0.000000 = 0.000000 = 0.000000 = 0.000000 = 0.000000 = 0.000000 EPC HI FCSR = 00000000 FCCR = 00000000 FEXR = 00000000 Double Floating Point Registers FP8 = 0.000000 FP16 = 0.000000 FP24 = 0.000000 FP10 = 0.000000 FP18 = 0.000000 FP26 = 0.000000 FP12 = 0.000000 FP20 = 0.000000 FP28 = 0.000000 FP14 = 0.000000 FP22 = 0.000000 FP30 = 0.000000 Single Floating Point Registers FP8 = 0.000000 FP16 = 0.000000 FP24 = 0.000000 FP9 = 0.000000 FP17 = 0.000000 FP25 = 0.000000 FP10 = 0.000000 FP18 = 0.000000 FP26 = 0.000000 FP11 = 0.000000 FP19 = 0.000000 FP27 = 0.000000 FP12 = 0.000000 FP20 = 0.000000 FP28 = 0.000000 FP13 = 0.000000 FP21 = 0.000000 FP29 = 0.000000 FP14 = 0.000000 FP22 = 0.000000 FP30 = 0.000000 FP15 = 0.000000 FP23 = 0.000000 FP31 = 0.000000 Program [0x00400000] [0x00400004] [0x00400008] [0x0040000c] [0x00400010] [0x00400014] [0x00400018] [0x0040001c] [0x00400020] KERNEL [0x80000180] [0x80000184] [0x8000018c] [0x80000190] [0x80000194] [0x80000198] [0x8000019c] [0x800001a0] [0x800001a4] [0x800001a8] [0x800001ac] [0x800001b0] [0x800001b4] [0x800001b8] [0x800001bc] [0x800001c0] [0x800001c4] [0x800001c8] ... 0x8fa40000 0x27a50004 0x24a60004 0x00041080 0x00c23021 0x0c000000 0x00000000 0x3402000a 0x0000000c address 0x0001d821 0x3c019000 0x3c019000 0xac240204 0x401a6800 0x001a2082 0x3084001f 0x34020004 0x3c049000 0x0000000c 0x34020001 0x001a2082 0x3084001f 0x0000000c 0x34020004 0x3344003c 0x3c019000 0x00240821 lw $4, 0($29) ; 175: lw $a0 0($sp) # argc addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp sll $2, $4, 2 ; 178: sll $v0 $a0 2 addu $6, $6, $2 ; 179: addu $a2 $a2 $v0 jal 0x00000000 [main] ; 180: jal main nop ; 181: nop ori $2, $0, 10 ; 183: li $v0 10 syscall ; 184: syscall # syscall(exit) machine code Assembly code addu $27, $0, $1 ; 82: move $k1 $at lui $1, -28672 ; 84: sw $v0 s1 lui $1, -28672 ; 85: sw $a0 s2 comment sw $4, 516($1) mfc0 $26, $13 ; 87: mfc0 $k0 $13 srl $4, $26, 2 ; 88: srl $a0 $k0 2 andi $4, $4, 31 ; 89: andi $a0 $a0 0x1f ori $2, $0, 4 ; 93: li $v0 4 # print_str lui $4, -28672 [__m1_]; 94: la $a0 __m1_ syscall ; 95: syscall ori $2, $0, 1 ; 97: li $v0 1 # print_int srl $4, $26, 2 ; 98: srl $a0 $k0 2 andi $4, $4, 31 ; 99: andi $a0 $a0 0x1f syscall ; 100: syscall ori $2, $0, 4 ; 102: li $v0 4 # print_str andi $4, $26, 60 ; 103: andi $a0 $k0 0x3c lui $1, -28672 ; 104: lw $a0 __excp($a0) addu $1, $1, $4 Memory DATA [0x10000000]...[0x10040000] STACK [0x7fffeffc] KERNEL DATA [0x90000000] [0x90000010] [0x90000020] [0x90000030] [0x90000040] [0x90000050] [0x90000060] [0x90000070] ... address 0x00000000 0x00000000 0x78452020 0x72727563 0x000a6465 0x2000205d 0x20005d42 0x73657264 0x2f74736e 0x5b202000 0x74706563 0x206e6f69 0x636f2000 0x61206465 0x6920646e 0x726f6e67 0x495b2020 0x7265746e 0x74707572 0x4c545b20 0x20005d42 0x4c545b20 0x4c545b20 0x20005d42 0x64415b20 0x72652073 0x20726f72 0x69206e69 0x61746164 0x74656620 0x205d6863 0x72646441 0x20737365 0x6f727265 content
© Copyright 2026 Paperzz