Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SYS_EXIT = 1
  2. EXIT_SUCCES = 0
  3.  
  4. .data
  5. liczba1: .long 0x01234567, 0x89ABCDEF, 0x76543210, 0xFEDCBA98
  6. liczba2: .long 0x4000FFFF, 0xFFF20026, 0x321000CB, 0xF4520031
  7.  
  8. .text
  9. .global _start
  10.  
  11. _start:
  12.  
  13. movl $4, %ecx
  14. clc
  15.  
  16. petla:
  17.     cmp $0, %ecx
  18.     je zakoncz
  19.     movl %ecx, %edx
  20.     decl %edx
  21.     movl liczba1(, %edx, 4), %eax
  22.     movl liczba2(, %edx, 4), %ebx
  23.     adcl %ebx, %eax
  24.     pushl %eax
  25.  
  26.     jc przeniesienie
  27.     pushl $0
  28.  
  29.     dalej:
  30.     decl %ecx
  31.     jmp petla
  32.  
  33. przeniesienie:
  34.     movl $0, %eax
  35.     adcl $0, %eax
  36.     pushl %eax
  37.     jmp dalej
  38.    
  39. zakoncz:
  40.     movl $SYS_EXIT, %eax
  41.     movl $EXIT_SUCCES, %ebx
  42.     int $0x80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement