This is a simple CGI interface to SPIM, the simulator for the MIPS R2000/R3000 Assembly Language written and copyrighted by James R. Larus. The CGI actually runs an essentially unmodified version of spim; the only significant modification is to force the lexer to read a sequence of spim commands from this CGI interface. See http://www.cs.wisc.edu/~larus/spim.html for more information about spim.
Enter/edit your MIPS program here: .text .globl main .globl _exit .globl _print_int .globl _print_string main: lui $gp,4096 jal _main _exit: ori $v0,$0,10 syscall _print_int: ori $v0,$0,1 syscall jr $ra _print_string: ori $v0,$0,4 syscall jr $ra .text .globl _main _0: .data 268435456 .byte 72, 101, 108, 108, 111, 44, 32, 119 .byte 111, 114, 108, 100, 33, 10 .byte 0 .text lui $t0,4096 or $a0,$t0,$0 jal _print_string or $t0,$v0,$0 _1: lw $ra,-4($fp) or $sp,$fp,$0 lw $fp,0($sp) addi $sp,$sp,4 jr $ra _main: addi $sp,$sp,-8 sw $fp,4($sp) addi $fp,$sp,4 sw $ra,-4($fp) j _0
The C program that generated this page was written by Hank Dietz using the CGIC library to implement the CGI interface.
Computer Organization and Design.