User Tools

Site Tools


mywiki:hw:mips:mipssimulator

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mywiki:hw:mips:mipssimulator [2014/07/26 18:32] shaoguohmywiki:hw:mips:mipssimulator [2022/04/02 17:29] (current) – external edit 127.0.0.1
Line 1: Line 1:
 MIPS Simulator-SPIM MIPS Simulator-SPIM
  
-| {{:mywiki:hw:mips:pcspim.zip|PcSpim For Windows}} | +====== SPIM Simulator for Windows ====== 
 +| {{:mywiki:hw:mips:pcspim.zip|PcSpim For Windows download}} |  
 +| [[pcspim_syscall]] | 
 + 
 +====== SPIM Example 1 ======
  
 <file asm test1.asm > <file asm test1.asm >
Line 60: Line 64:
  
  
 +
 +====== SPIM Example 2 ======
 +<file asm test2.asm>
 +## addEm.asm
 +## program to add two integers
 +##
 +        .text
 +        .globl  main
 +
 +main:
 +        la    $t0,val2     #  put a 32-bit address into $t0
 +        lw    $t1,0($t0)   #  load first value, 2
 +        lw    $t2,4($t0)   #  load second value, 3
 +        sll   $0,$0,     #  load delay slot
 +        addu  $t1,$t1,$t2  #  calc. sum
 +
 +        .data
 +val0:   .word   
 +val1:   .word   
 +val2:   .word   
 +val3:   .word   
 +val4:   .word   
 +val5:   .word   
 +
 +</file>
mywiki/hw/mips/mipssimulator.1406370770.txt.gz · Last modified: (external edit)