Presentation is loading. Please wait.

Presentation is loading. Please wait.

PCSpim Introduction. Register contentProgramMemory contentMessage.

Similar presentations


Presentation on theme: "PCSpim Introduction. Register contentProgramMemory contentMessage."— Presentation transcript:

1 PCSpim Introduction

2 Register contentProgramMemory contentMessage

3 Register Content

4 PC = 00000000 EPC = 00000000 Cause = 00000000 BadVAddr= 00000000 Status = 3000ff10 HI = 00000000 LO = 00000000 General Registers R0 (r0) = 00000000 R8 (t0) = 00000000 R16 (s0) = 00000000 R24 (t8) = 00000000 R1 (at) = 00000000 R9 (t1) = 00000000 R17 (s1) = 00000000 R25 (t9) = 00000000 R2 (v0) = 00000000 R10 (t2) = 00000000 R18 (s2) = 00000000 R26 (k0) = 00000000 R3 (v1) = 00000000 R11 (t3) = 00000000 R19 (s3) = 00000000 R27 (k1) = 00000000 R4 (a0) = 00000000 R12 (t4) = 00000000 R20 (s4) = 00000000 R28 (gp) = 10008000 R5 (a1) = 00000000 R13 (t5) = 00000000 R21 (s5) = 00000000 R29 (sp) = 7fffeffc R6 (a2) = 00000000 R14 (t6) = 00000000 R22 (s6) = 00000000 R30 (s8) = 00000000 R7 (a3) = 00000000 R15 (t7) = 00000000 R23 (s7) = 00000000 R31 (ra) = 00000000 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

5 Program

6 [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]0x0c000000 jal 0x00000000 [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(exit) KERNEL [0x80000180]0x0001d821 addu $27, $0, $1 ; 82: move $k1 $at [0x80000184]0x3c019000 lui $1, -28672 ; 84: sw $v0 s1 [0x8000018c]0x3c019000 lui $1, -28672 ; 85: sw $a0 s2 [0x80000190]0xac240204 sw $4, 516($1) [0x80000194]0x401a6800 mfc0 $26, $13 ; 87: mfc0 $k0 $13 [0x80000198]0x001a2082 srl $4, $26, 2 ; 88: srl $a0 $k0 2 [0x8000019c]0x3084001f andi $4, $4, 31 ; 89: andi $a0 $a0 0x1f [0x800001a0]0x34020004 ori $2, $0, 4 ; 93: li $v0 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# print_int [0x800001b0]0x001a2082 srl $4, $26, 2 ; 98: srl $a0 $k0 2 [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# 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... addressmachine code Assembly code comment

7 Memory

8 DATA [0x10000000]...[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... address content

9

10

11


Download ppt "PCSpim Introduction. Register contentProgramMemory contentMessage."

Similar presentations


Ads by Google