Skip to content

Instantly share code, notes, and snippets.

@abuiles
Created March 11, 2010 16:55
Show Gist options
  • Save abuiles/329343 to your computer and use it in GitHub Desktop.
Save abuiles/329343 to your computer and use it in GitHub Desktop.
segment .data
notas: dd 1,2,3,4,5,6,7,8,9,10
veinte: dd 0.20
segment .bss
segment .text
global main
main:
mov ebx,notas
mov eax,0
mov edx,0
mov ecx,3
jmp fstloop
fstloop:
mov eax,[ebx]
add edx,eax
add ebx,4
loop fstloop ;; la suma total de este loop por 0.20
mov ecx,3
sndloop:
mov eax,[ebx]
add edx,eax
add ebx,4
loop sndloop ;; la suma final de esto por el 0.60
mov ecx,4
thdloop:
mov eax,[ebx]
add edx,eax
add ebx,4
loop thdloop ;; la suma final de esto por el 0.20
jmp fin
fin:
mov eax,1
mov ebx,0
int 0x80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment