SHARE
TWEET

Untitled

a guest Jul 2nd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .global _start
  2. ! l0 -  wskaźnik na tabb[i]
  3. ! l1 - k
  4. ! l3 - wstaźnik na tab[k]
  5. ! l4 - tab[i]
  6. ! l5 - tab[k]
  7.  
  8. _start:
  9. SAVE %sp, -96, %sp
  10. MOV %i0, %l0  !  wskaźnik na tabb[i]
  11. MOV %i1, %l1  ! rozmiar
  12. SUB %l1, 1, %l1 ! rozmiar - 1 = k
  13. MUL %l1, 4, %l3
  14. ADD %l3, %l0, %l3
  15.  
  16. loop:
  17.     ld [%l0], %l4
  18.     ld [%l3], %l5
  19.     SUBCC %l4, %l5, %l7
  20.     BLE next
  21.     ADD %l0, 4, %l0
  22.     ST [%l0], %l5
  23.     ST [%l3], %l4
  24.    
  25. next:
  26.     SUB %l3, 4, %l3
  27.     SUBCC %l3, %l0, %l7
  28.     BLE end
  29.     BA loop;
  30.  
  31. end:
  32.     Ret
  33.     Restore
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top