Facebook
From Silly Porcupine, 9 Months ago, written in Plain Text.
This paste is a reply to Untitled from Burly Giraffe - view diff
Embed
Download Paste or View Raw
Hits: 302
  1. global suma
  2. extern printf
  3.  
  4. section .text
  5.  
  6. suma:
  7.        
  8. push    r12
  9. push    r15
  10.  
  11. mov     r12,0 ;na sume parz
  12. mov     r15,0 ;na sume nieparz
  13.  
  14. petla:
  15. dec     rsi
  16. mov     rax, qword [rdi+rsi*4] ;element tablicy do rax
  17. jp      parz
  18. jnp     nieparz
  19.  
  20.  
  21. parz:
  22. add     r12,[rax]
  23. jmp     warunek
  24.  
  25. nieparz:
  26. add     r15,[rax]
  27.  
  28. warunek:
  29. cmp rsi, 0
  30. jae     petla
  31.  
  32. end_while:
  33. mov     [rdx], r12
  34. mov     [rdx+4], r15
  35.  
  36. pop     r15
  37. pop     r12
  38. ret

Replies to Re: Untitled rss

Title Name Language When
Re: Re: Untitled Scanty Duck text 9 Months ago.
Re: Re: Untitled Sexy Hummingbird text 9 Months ago.