Last modified: Feb 15, 2026
I think I will be talking about some random MIPS stuff.
.data
example_variable: .word 0
.text
.globl main
main:
#end program
li $v0, 10
syscall
JsSpim This is very good online MIPS emulator. I found this more useful and user friendly than homebrew spim that I was originally using.
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
These two videos gave me enough explanation.