Advertisement
Matiasdlsr

b.28

Sep 24th, 2023
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .data
  2.     vector: .word 100,-20,40,-365,400,65536,1,0,3,-10
  3.     marca:
  4.     coma: .string ","
  5. .text
  6.     la a3,vector
  7.     la a1,marca
  8.     la a2,coma
  9.     sub a1,a1,a3
  10.     srai a1,a1,2
  11.    
  12. printvector:
  13.     addi a1,a1,-1
  14.  
  15.     lw a0,0(a3)
  16.     li a7,1
  17.     ecall
  18.     beq a1,x0,fin
  19.    
  20.     lw a0,0(a2)
  21.     li a7,11
  22.     ecall
  23.     addi a3,a3,4
  24.     blt x5,a1,printvector
  25. fin:
  26.     beq x0,x0,fin
  27.  
  28.  
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement