Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. # Source File: asig1.asm
  2. # Student: Hector Diaz Pla
  3. # Student #: 841-09-2313
  4. #
  5. # Poner las differentes partes de el codigo maquina de la instruccion
  6. # addu $10, $8, $9
  7. # en registros diferentes y moverlos juntos a el registro $25
  8. # para que en el registro $25 se lea la instruccion en codigo maquina
  9. .text
  10. .globl main
  11.  
  12. main: or $25, $0, $0 # clear $25
  13.  
  14. ori $8, $0, 0x8 # $8 <- operand
  15. ori $9, $0, 0x9 # $9 <- operand2
  16. ori $10, $0, 0xA # $10 <- dest
  17. ori $11, $0, 0x21 # secondary
  18.  
  19. sll $8, $8, 21 # shift the contents
  20. sll $9, $9, 16 # to the appropriate
  21. sll $10, $10, 11 # positions
  22.  
  23. or $25, $25, $8 # OR the contents
  24. or $25, $25, $9 # together on
  25. or $25, $25, $10 # register $25
  26. or $25, $25, $11 # $25 <- $8|$9|$10|$11
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement