Advertisement
foreverfugazi

C code

Oct 2nd, 2024 (edited)
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. .data
  2. a: .word 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  3. b: .word 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  4. c: .word 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  5.  
  6. .text
  7. la x1, a
  8. la x2, b
  9. la x3, c
  10. addi x4, x0, 0
  11. li x10, 10
  12. loop:
  13. lw x6, 0(x1)
  14. lw x7, 0(x2)
  15. mul x8, x6, x7
  16. lw x9, -4(x3)
  17. add x8, x8, x9
  18. sw x8, 0(x3)
  19. addi x4, x4, 1
  20. addi x1, x1, 4
  21. addi x2, x2, 4
  22. addi x3, x3, 4
  23. bne x4, x10, loop
  24. exit:
  25. nop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement