Last active
August 29, 2015 14:00
-
-
Save goatandsheep/11081785 to your computer and use it in GitHub Desktop.
This file contains 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
; Kemal Ahmed | |
; 2014-04-18 | |
%include "asm_io.inc" | |
%define array[ebp+0x8] | |
%define size[ebp+0xC] | |
segment .data | |
segment .bss | |
segment .text | |
global fcn | |
fcn: | |
enter 0, 0 | |
pusha | |
mov ecx, size | |
mov ebx, array | |
jz bass | |
dec ecx ; size-1 | |
push ecx | |
push ebx | |
call fcn | |
add ebp, 8 | |
;mov ebx, array | |
mov ebx, [ebx + 4*ecx] | |
add eax, ebx | |
jmp done | |
bass: xor eax, eax | |
done: | |
call print_int | |
popa | |
leave | |
ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment