Skip to content

Instantly share code, notes, and snippets.

@Sammons
Last active August 29, 2015 14:00
Show Gist options
  • Save Sammons/c046ad9856fe03f87332 to your computer and use it in GitHub Desktop.
Save Sammons/c046ad9856fe03f87332 to your computer and use it in GitHub Desktop.
learning liger mips
.data
spec: .byte 'a','b','\0'
.text
main:
li $v0, 1 # Load 1 to $v0 so we tell the OS to print
li $t1, 5 # $t1 = 5
move $a0, $t1 # $a0 = $t1, because $a0 is value printed
syscall # call operating sys for print
li $v0, 4
la $t1, spec+1
move $a0, $t1
syscall
li $v0, 10 # system call code for exit = 10
syscall # call operating sys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment