matogens

laby_6 b) dokonczyc

Apr 2nd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. section .bss
  2.    
  3. integer resd 1
  4.  
  5. section .data
  6.  
  7. liczba db 1
  8. sum dd 0
  9. iterator dd 1
  10.  
  11. section .text
  12.  
  13. global _start
  14.  
  15. _start:
  16.  
  17.     mov eax, 3
  18.     mov ebx, 0
  19.     mov ecx, integer
  20.     mov edx, 1
  21.  
  22.     mov ecx, [integer]
  23.     sub ecx, '0'
  24.     mov eax, [sum]
  25.     sub eax, '0'
  26.     mov ebx, [iterator]
  27.     sub ebx, '0'
  28.     add eax, ebx
  29.     inc ebx
  30.    
  31.     cmp ecx, ecx
  32.     jn
Advertisement
Add Comment
Please, Sign In to add comment