Created
November 6, 2012 13:01
-
-
Save RichardCSantana-zz/4024598 to your computer and use it in GitHub Desktop.
Soma de dois números em assembly (Arquitetura Mips)
This file contains 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
.text | |
main: | |
li $s0, 10 # insere o valor 10 no regitrador $s0 | |
li $s1, 17 # insere o valor 17 no regitrador $s1 | |
add $s2,$s1,$s0 # soma o valor dos registradores $s0 e $s1 e insere no registrador $s2 | |
la $a0, ($s2) #coloca o registrador $s2 para ser impresso | |
li $v0,1 #comando de impressão de inteiro na tela | |
syscall # efetua a chamada ao sistema | |
li $v0, 10 # comando de exit | |
syscall # efetua a chamada ao sistema |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks, this help me!