MIPS 01
Last modified: Feb 15, 2026
I think I will be talking about some random MIPS stuff.
Basic Formatting
.data
example_variable: .word 0
.text
.globl main
main:
#end program
li $v0, 10
syscall
Testing / Compiling
JsSpim This is a very good online MIPS emulator. I found it more useful and user-friendly than the Homebrew spim that I was originally using.
Syscall
While I was working on the homework, I found this website: syscall reference. It is very well documented. The basic use of syscall is shown above as well. If you want to take integer input, this is what you need to do.
main:
# int t0 = getchar()
li $v0, 5
syscall
move $t0, $v0
Stack Pointer
These two videos gave me enough of an explanation.