SHARE
TWEET

Untitled

a guest Jul 1st, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .global _start
  2.  
  3. _start:
  4.     mov 4, %l4  ! zapisz stala 4 w l4
  5.     mov %i0, %l5 ! iterator w l5
  6.     ld [%g0], %l0
  7.     mov %l0, %l2 ! przechowywane min w l2
  8.     mov %l0, %l3 ! przechowywane max w l3
  9. loop:
  10.     ld [%g0 + %l4], %l0
  11.     add %l4, 4, %l4 !dodaj 4 do wartosci l4
  12.     subcc %l2, %l0, %o0
  13.     bpos noweMin
  14.     subcc %l3, %l0, %o0
  15.     bneg noweMax
  16. back:  
  17.     subcc %l5, 1, %l5
  18.     bge loop
  19.     bl koniec
  20.     nop
  21. noweMin:
  22.     mov %l0, %l2 !znaleziono nowe min, zamiana w l2
  23.     ba back
  24.     nop
  25. noweMax:
  26.     mov %l0, %l3 !znaleziono nowe max, zamiana w l3
  27.     ba back
  28.     nop
  29. koniec:
  30.     !koniec
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