section .data
array dw 1,1,2,-4,13,14
section .bss
res resd 1
section .text
global _start
_start:
mov ecx, 6
mov esi, array
mov eax, 0
lp:
add eax, [esi]
add esi, 4
loop lp
mov [res], eax
mov ecx, [res]
mov edx, 4
mov ebx, 1
mov eax, 4
int 0x80