Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .text
- .global countrec
- countrec:
- push %ebp
- mov %esp, %ebp
- push %edi
- push %esi
- push %ebx
- mov 8(%ebp), %edi
- movl 0(%edi), %esi
- movl 4(%edi), %ecx
- addl %esi, %ecx
- mov $0, %ebx
- while:
- mov 4(%ebp), %edx
- cmpl %edx, %esi
- jl end
- mov 4(%ebp), %edx
- cmpl %edx, %ecx
- jg end
- addl $1, %ebx
- movl (%ebp), %ebp
- jmp while
- end:
- movl 8(%edi), %eax
- movl %ebx, (%eax)
- pop %ebx
- pop %esi
- pop %edi
- mov %esp, %ebp
- pop %ebp
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement