Skip to content

Commit

Permalink
multiplicacao e divisao
Browse files Browse the repository at this point in the history
falta tratar os inputs na multiplicacao e  trocar a divisao de inteiro para float
  • Loading branch information
chieppe7 committed Apr 25, 2020
1 parent c687c9d commit 0cbcc44
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ exec_soma:
j print_result

soma:
soma: #soma dois valores
add $v0, $a0, $a1
jr $ra
Expand All @@ -127,12 +127,34 @@ exec_subtr:

j print_result

subtr:
subtr: #subtrai 2 valores
sub $v0, $a0, $a1

jr $ra
#TODO - outras opções
exec_multi:
jal multi

j print_result

multi: #multiplica 2 valores de 16bits
mult $a0, $a1
mflo $v0

jr $ra


exec_divi:
jal divi

j print_result

divi: #divide 2 valores de 16bits
div $a0, $a1
mflo $v0

jr $ra


print_result:
#impressão do resultado de uma função
Expand Down

0 comments on commit 0cbcc44

Please sign in to comment.