-
-
Save abuiles/331377 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
segment .data | |
notas: dd 1,2,3,4,5,6,7,8,9,10 | |
total: dd 0 | |
segment .bss | |
segment .text | |
global main | |
main: | |
mov ebx,notas | |
mov eax,0 | |
mov edx,0 | |
mov ecx,3 | |
jmp fstloop | |
fstloop: | |
add eax,[ebx] | |
add ebx,4 | |
loop fstloop ;; la suma total de este loop por 0.20 | |
mov ecx, 5 | |
div ecx | |
add [total], eax | |
mov edx,0 | |
mov eax,0 | |
mov ecx,3 | |
sndloop: | |
add eax,[ebx] | |
add ebx,4 | |
loop sndloop ;; la suma final de esto por el 0.60 | |
mov ecx, 6 | |
mul ecx | |
mov ecx, 10 | |
div ecx | |
add [total], eax | |
mov edx,0 | |
mov eax,0 | |
mov ecx,4 | |
thdloop: | |
add eax,[ebx] | |
add ebx,4 | |
loop thdloop ;; la suma final de esto por el 0.20 | |
mov ecx, 5 | |
div ecx | |
add [total], eax | |
mov edx, 0 | |
mov ecx,3 | |
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