11eimilia11

Untitled

Oct 6th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. # colocando em um reg uma constante de 32 bits em hexadecimal
  2.  
  3. # o lui é um load immediate
  4. lui $t0, 0X003C # colocando os 16 bits mais significativos
  5. addi $t0, $t0, 0x0900 # adicionando com os 16 bits menos significativos
  6.  
  7.  
  8. # teste a = 1 b = 1
  9. addi $t0, $zero, 1
  10. addi $t1, $zero, 1
  11.  
  12. # a = $t0, b = $t1, c = $t2
  13. bne $t0, $t1, Else
  14. add $t0, $t0, $t1
  15. addi $t2, $t0, 2
  16. j Exit
  17.  
  18. Else:
  19. addi $t2, $t0, 1
  20. Exit:
Add Comment
Please, Sign In to add comment