title: How can I print array in Assembly
body: <p>I want to print result array, which has 3000 elements. I wrote this code:</p>
  
  <pre><code>.intel_syntax noprefix
  .text
  .globl main
  main:
  mov ecx, 3000
  mov edx, offset result
  llp:
  
  mov al,[edx]
  push eax
  mov eax, offset message
  push eax
  call printf
  add esp, 8
  inc edx
  
  loop llp
  mov eax, 0
  ret
  
  .data
  message : 
  .asciz " Wynik: %i\n"
  </code></pre>
  
  <p>The problem is, that program prints only first element 3000 times. What should I change?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>solved</p>