Last active
August 29, 2015 14:00
-
-
Save Sammons/c046ad9856fe03f87332 to your computer and use it in GitHub Desktop.
learning liger mips
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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